aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtGui/grandparent_method_test.py
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-06-07 14:43:45 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-06-07 16:57:11 -0300
commitab918abc1e103e0ca86939f7d057e8a44ac8a4ef (patch)
tree53c6f57d089dcf5e145d766b1ceef704714046d8 /tests/QtGui/grandparent_method_test.py
parent471486732b03cbb42b884158604a59d5a18e8a35 (diff)
Created new unittest model.
Separete unittest for module. Only run unittest for compiled modules. Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>, Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests/QtGui/grandparent_method_test.py')
-rw-r--r--tests/QtGui/grandparent_method_test.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/QtGui/grandparent_method_test.py b/tests/QtGui/grandparent_method_test.py
new file mode 100644
index 000000000..3c1829377
--- /dev/null
+++ b/tests/QtGui/grandparent_method_test.py
@@ -0,0 +1,23 @@
+
+'''Tests for calling methods further than the direct parent'''
+
+import unittest
+
+from PySide.QtGui import QPushButton, QWidget
+
+from helper import UsesQApplication
+
+class Dummy(QPushButton):
+
+ def show(self):
+ QWidget.show(self)
+ self.called = True
+
+class GrandParentMethod(UsesQApplication):
+ def testMethod(self):
+ obj = Dummy()
+ obj.show()
+ self.assert_(obj.called)
+
+if __name__ == '__main__':
+ unittest.main()