aboutsummaryrefslogtreecommitdiffstats
path: root/tests/pysidetest/application_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pysidetest/application_test.py')
-rw-r--r--tests/pysidetest/application_test.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/pysidetest/application_test.py b/tests/pysidetest/application_test.py
new file mode 100644
index 000000000..39a828379
--- /dev/null
+++ b/tests/pysidetest/application_test.py
@@ -0,0 +1,23 @@
+#!/usr/bin/python
+
+import unittest
+from testbinding import TestObject
+from PySide.QtGui import QApplication
+
+class QApplicationInstance(unittest.TestCase):
+
+ def appDestroyed(self):
+ sefl.assert_(False)
+
+ def testInstanceObject(self):
+ TestObject.createApp()
+ app1 = QApplication.instance()
+ app2 = QApplication.instance()
+ app1.setObjectName("MyApp")
+ self.assertEqual(app1, app2)
+ self.assertEqual(app2.objectName(), app1.objectName())
+ app1.destroyed.connect(self.appDestroyed)
+
+if __name__ == '__main__':
+ unittest.main()
+