aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtGui/qdynamic_signal.py
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-06-29 16:37:05 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-06-29 16:47:59 -0300
commit4c6e35634c220a9bc64b33db41a80360a3bc6e18 (patch)
tree5deb6dbecbde5c043faed311a4d6fcc077225958 /tests/QtGui/qdynamic_signal.py
parent27530522a8b494874549f11bcdd2a56e685870ba (diff)
Created unit test to use signals in objects not created on python.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'tests/QtGui/qdynamic_signal.py')
-rw-r--r--tests/QtGui/qdynamic_signal.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/QtGui/qdynamic_signal.py b/tests/QtGui/qdynamic_signal.py
new file mode 100644
index 000000000..db3218e50
--- /dev/null
+++ b/tests/QtGui/qdynamic_signal.py
@@ -0,0 +1,27 @@
+
+import unittest
+
+from PySide.QtGui import QInputDialog
+
+from helper import UsesQApplication
+
+class DynamicSignalTest(UsesQApplication):
+
+ def cp(self, obj):
+ self._called = True
+
+ def testQDialog(self):
+ dlg = QInputDialog()
+ dlg.setInputMode(QInputDialog.TextInput)
+ lst = dlg.children()
+ self.assert_(len(lst))
+ obj = lst[0]
+ self._called = False
+ obj.destroyed.connect(self.cb)
+ obj = None
+ del dlg
+ self.assert_(self._called)
+
+
+if __name__ == '__main__':
+ unittest.main()