aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorrenatofilho <renato.filho@openbossa.org>2010-09-20 15:12:08 -0300
committerrenatofilho <renato.filho@openbossa.org>2010-09-20 15:53:01 -0300
commit80c2ebe62694815e2023b5fbafb9242fbdd1f2c9 (patch)
tree4f89280e9563f764c7e4ae3df1d076459844d824 /tests
parentb476759ed077e45f6d9ec78cf367554f1f5114f3 (diff)
Created unit test for bug 363.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/QtGui/CMakeLists.txt1
-rw-r--r--tests/QtGui/bug_363.py25
2 files changed, 26 insertions, 0 deletions
diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt
index 887caa62e..ea6b4a607 100644
--- a/tests/QtGui/CMakeLists.txt
+++ b/tests/QtGui/CMakeLists.txt
@@ -6,6 +6,7 @@ PYSIDE_TEST(bug_300_test.py)
PYSIDE_TEST(bug_307.py)
PYSIDE_TEST(bug_324.py)
PYSIDE_TEST(bug_338.py)
+PYSIDE_TEST(bug_363.py)
PYSIDE_TEST(add_action_test.py)
PYSIDE_TEST(customproxywidget_test.py)
PYSIDE_TEST(float_to_int_implicit_conversion_test.py)
diff --git a/tests/QtGui/bug_363.py b/tests/QtGui/bug_363.py
new file mode 100644
index 000000000..5ba5deee7
--- /dev/null
+++ b/tests/QtGui/bug_363.py
@@ -0,0 +1,25 @@
+''' Test bug 363: http://bugs.openbossa.org/show_bug.cgi?id=363'''
+
+import sys
+import unittest
+from helper import UsesQApplication
+from PySide import QtCore,QtGui
+
+# Check for desktop object lifetime
+class BugTest(UsesQApplication):
+ def mySlot(self):
+ pass
+
+ # test if it is possible to connect with a desktop object after storing that on an auxiliar variable
+ def testCase1(self):
+ desktop = QtGui.QApplication.desktop()
+ desktop.resized[int].connect(self.mySlot)
+ self.assert_(True)
+
+ # test if it is possible to connect with a desktop object without storing that on an auxiliar variable
+ def testCase2(self):
+ QtGui.QApplication.desktop().resized[int].connect(self.mySlot)
+ self.assert_(True)
+
+if __name__ == '__main__':
+ unittest.main()