diff options
Diffstat (limited to 'sources/pyside6/tests/signals/signal_manager_refcount_test.py')
-rw-r--r-- | sources/pyside6/tests/signals/signal_manager_refcount_test.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sources/pyside6/tests/signals/signal_manager_refcount_test.py b/sources/pyside6/tests/signals/signal_manager_refcount_test.py index 31d3bc85e..955d5b65b 100644 --- a/sources/pyside6/tests/signals/signal_manager_refcount_test.py +++ b/sources/pyside6/tests/signals/signal_manager_refcount_test.py @@ -12,11 +12,12 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import QObject, SIGNAL +from PySide6.QtCore import QObject class SignalManagerRefCount(unittest.TestCase): - """Simple test case to check if the signal_manager is erroneously incrementing the object refcounter""" + """Simple test case to check if the signal_manager is erroneously incrementing the + object refcounter.""" @unittest.skipUnless(hasattr(sys, "getrefcount"), f"{sys.implementation.name} has no refcount") def testObjectRefcount(self): @@ -27,10 +28,9 @@ class SignalManagerRefCount(unittest.TestCase): refcount = sys.getrefcount(obj) obj.destroyed.connect(callback) self.assertEqual(refcount, sys.getrefcount(obj)) - QObject.disconnect(obj, SIGNAL('destroyed()'), callback) + obj.destroyed.disconnect(callback) self.assertEqual(refcount, sys.getrefcount(obj)) if __name__ == '__main__': unittest.main() - |