diff options
Diffstat (limited to 'sources/shiboken6/tests/samplebinding/__del___test.py')
-rw-r--r-- | sources/shiboken6/tests/samplebinding/__del___test.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sources/shiboken6/tests/samplebinding/__del___test.py b/sources/shiboken6/tests/samplebinding/__del___test.py index 2d38b24d7..456886614 100644 --- a/sources/shiboken6/tests/samplebinding/__del___test.py +++ b/sources/shiboken6/tests/samplebinding/__del___test.py @@ -16,11 +16,13 @@ import sample delCalled = False + class MyObject(sample.ObjectType): def __del__(self): global delCalled delCalled = True + class TestDel(unittest.TestCase): def testIt(self): a = MyObject() @@ -29,6 +31,6 @@ class TestDel(unittest.TestCase): gc.collect() self.assertTrue(delCalled) + if __name__ == '__main__': unittest.main() - |