diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/gis_tests/test_ptr.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/gis_tests/test_ptr.py b/tests/gis_tests/test_ptr.py index ca318a28eb..1d80e24f92 100644 --- a/tests/gis_tests/test_ptr.py +++ b/tests/gis_tests/test_ptr.py @@ -64,3 +64,11 @@ class CPointerBaseTests(SimpleTestCase): fg.ptr = ptr del fg destructor_mock.assert_called_with(ptr) + + def test_destructor_catches_importerror(self): + class FakeGeom(CPointerBase): + destructor = mock.Mock(side_effect=ImportError) + + fg = FakeGeom() + fg.ptr = fg.ptr_type(1) + del fg |
