aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/tests/QtCore/qslot_object_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside2/tests/QtCore/qslot_object_test.py')
-rw-r--r--sources/pyside2/tests/QtCore/qslot_object_test.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/sources/pyside2/tests/QtCore/qslot_object_test.py b/sources/pyside2/tests/QtCore/qslot_object_test.py
index b8d5513ff..7a2691a06 100644
--- a/sources/pyside2/tests/QtCore/qslot_object_test.py
+++ b/sources/pyside2/tests/QtCore/qslot_object_test.py
@@ -31,7 +31,10 @@
import unittest
from PySide2 import QtCore
-global qApp
+"""
+This is a simple slot test that was updated to use the qApp "macro".
+It is implicitly in builtins and does not need an import.
+"""
class objTest(QtCore.QObject):
@@ -41,21 +44,15 @@ class objTest(QtCore.QObject):
self.ok = False
def slot(self):
- global qApp
-
self.ok = True
qApp.quit()
-
class slotTest(unittest.TestCase):
def quit_app(self):
- global qApp
-
qApp.quit()
def testBasic(self):
- global qApp
timer = QtCore.QTimer()
timer.setInterval(100)
@@ -71,6 +68,5 @@ class slotTest(unittest.TestCase):
if __name__ == '__main__':
- global qApp
- qApp = QtCore.QCoreApplication([])
+ QtCore.QCoreApplication()
unittest.main()