aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/QtCore/qtimer_singleshot_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/tests/QtCore/qtimer_singleshot_test.py')
-rw-r--r--sources/pyside6/tests/QtCore/qtimer_singleshot_test.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/sources/pyside6/tests/QtCore/qtimer_singleshot_test.py b/sources/pyside6/tests/QtCore/qtimer_singleshot_test.py
index 1392281fa..9718a2427 100644
--- a/sources/pyside6/tests/QtCore/qtimer_singleshot_test.py
+++ b/sources/pyside6/tests/QtCore/qtimer_singleshot_test.py
@@ -85,6 +85,17 @@ class TestSingleShot(UsesQApplication):
self.assertTrue(thread.called)
self.assertEqual(self.qthread, thread.qthread)
+ def testSingleShotWithContextZero(self):
+ thread = ThreadForContext()
+ thread.start()
+ thread.context.moveToThread(thread)
+ QTimer.singleShot(0, thread.context, self.callback)
+ self.app.exec()
+ thread.wait()
+ self.assertTrue(self.called)
+ self.assertTrue(thread.called)
+ self.assertEqual(self.qthread, thread.qthread)
+
class SigEmitter(QObject):