diff options
| author | django-bot <ops@djangoproject.com> | 2022-02-03 20:24:19 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-07 20:37:05 +0100 |
| commit | 9c19aff7c7561e3a82978a272ecdaad40dda5c00 (patch) | |
| tree | f0506b668a013d0063e5fba3dbf4863b466713ba /tests/gis_tests/test_ptr.py | |
| parent | f68fa8b45dfac545cfc4111d4e52804c86db68d3 (diff) | |
Refs #33476 -- Reformatted code with Black.
Diffstat (limited to 'tests/gis_tests/test_ptr.py')
| -rw-r--r-- | tests/gis_tests/test_ptr.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/gis_tests/test_ptr.py b/tests/gis_tests/test_ptr.py index 1d80e24f92..a09679f5b9 100644 --- a/tests/gis_tests/test_ptr.py +++ b/tests/gis_tests/test_ptr.py @@ -6,7 +6,6 @@ from django.test import SimpleTestCase class CPointerBaseTests(SimpleTestCase): - def test(self): destructor_mock = mock.Mock() @@ -41,10 +40,10 @@ class CPointerBaseTests(SimpleTestCase): # results in a TypeError when trying to assign it to the `ptr` property. # Thus, memory addresses (integers) and pointers of the incorrect type # (in `bad_ptrs`) aren't allowed. - bad_ptrs = (5, ctypes.c_char_p(b'foobar')) + bad_ptrs = (5, ctypes.c_char_p(b"foobar")) for bad_ptr in bad_ptrs: for fg in (fg1, fg2): - with self.assertRaisesMessage(TypeError, 'Incompatible pointer type'): + with self.assertRaisesMessage(TypeError, "Incompatible pointer type"): fg.ptr = bad_ptr # Object can be deleted without a destructor set. @@ -60,7 +59,7 @@ class CPointerBaseTests(SimpleTestCase): # The destructor is called if set. fg = FakeGeom2() - ptr = fg.ptr_type(ctypes.c_float(1.)) + ptr = fg.ptr_type(ctypes.c_float(1.0)) fg.ptr = ptr del fg destructor_mock.assert_called_with(ptr) |
