aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/tests')
-rw-r--r--sources/pyside6/tests/QtCore/blocking_signals_test.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/sources/pyside6/tests/QtCore/blocking_signals_test.py b/sources/pyside6/tests/QtCore/blocking_signals_test.py
index 87d0701b8..92382c1d4 100644
--- a/sources/pyside6/tests/QtCore/blocking_signals_test.py
+++ b/sources/pyside6/tests/QtCore/blocking_signals_test.py
@@ -61,6 +61,13 @@ class TestSignalsBlockedBasic(unittest.TestCase):
del blocker
self.assertTrue(not obj.signalsBlocked())
+ def testContext(self):
+ obj = QObject()
+ self.assertTrue(not obj.signalsBlocked())
+ with QSignalBlocker(obj):
+ self.assertTrue(obj.signalsBlocked())
+ self.assertTrue(not obj.signalsBlocked())
+
class TestSignalsBlocked(unittest.TestCase):
'''Test case to check if the signals are really blocked'''