aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/QtCore/qobject_timer_event_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/tests/QtCore/qobject_timer_event_test.py')
-rw-r--r--sources/pyside6/tests/QtCore/qobject_timer_event_test.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/sources/pyside6/tests/QtCore/qobject_timer_event_test.py b/sources/pyside6/tests/QtCore/qobject_timer_event_test.py
index 0730dd1f0..8a7f4da7b 100644
--- a/sources/pyside6/tests/QtCore/qobject_timer_event_test.py
+++ b/sources/pyside6/tests/QtCore/qobject_timer_event_test.py
@@ -43,6 +43,7 @@ from PySide6.QtCore import QObject, QCoreApplication
from helper.usesqcoreapplication import UsesQCoreApplication
+
class Dummy(QObject):
def __init__(self, app):
@@ -58,23 +59,25 @@ class Dummy(QObject):
if self.times_called == 5:
self.app.exit(0)
+
class QObjectTimerEvent(UsesQCoreApplication):
def setUp(self):
- #Acquire resources
+ # Acquire resources
super(QObjectTimerEvent, self).setUp()
def tearDown(self):
- #Release resources
+ # Release resources
super(QObjectTimerEvent, self).tearDown()
def testTimerEvent(self):
- #QObject.timerEvent overloading
+ # QObject.timerEvent overloading
obj = Dummy(self.app)
timer_id = obj.startTimer(200)
self.app.exec_()
obj.killTimer(timer_id)
self.assertEqual(obj.times_called, 5)
+
if __name__ == '__main__':
unittest.main()