aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtCore/deletelater_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtCore/deletelater_test.py')
-rw-r--r--tests/QtCore/deletelater_test.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/QtCore/deletelater_test.py b/tests/QtCore/deletelater_test.py
new file mode 100644
index 000000000..3b2f7d9e3
--- /dev/null
+++ b/tests/QtCore/deletelater_test.py
@@ -0,0 +1,22 @@
+#!/usr/bin/python
+
+'''Test cases for QTimer.singleShot'''
+
+import unittest
+
+from PySide.QtCore import QObject, QTimer, QCoreApplication, SIGNAL
+from helper import UsesQCoreApplication
+
+class TestDeleteLater(UsesQCoreApplication):
+ '''Test case for function DeleteLater'''
+
+ def testCase(self):
+ o = QObject()
+ o.deleteLater()
+ del o
+ QTimer.singleShot(100, self.app.quit)
+ self.app.exec_()
+
+if __name__ == '__main__':
+ unittest.main()
+