From 80c2ebe62694815e2023b5fbafb9242fbdd1f2c9 Mon Sep 17 00:00:00 2001 From: renatofilho Date: Mon, 20 Sep 2010 15:12:08 -0300 Subject: Created unit test for bug 363. Reviewer: Luciano Wolf Marcelo Lira --- tests/QtGui/CMakeLists.txt | 1 + tests/QtGui/bug_363.py | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 tests/QtGui/bug_363.py (limited to 'tests') 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() -- cgit v1.2.3