From 87ea5d920c62eed3e9c1185fa66740c13c71f65b Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Wed, 15 Sep 2010 10:44:27 -0300 Subject: Fix bug#347 - "Setting properties in constructors gives incorrect results" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added new function to libpyside: "fillQtProperties". Reviewer: Luciano Wolf Renato Araújo --- tests/QtCore/CMakeLists.txt | 1 + tests/QtCore/setprop_on_ctor_test.py | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 tests/QtCore/setprop_on_ctor_test.py (limited to 'tests') diff --git a/tests/QtCore/CMakeLists.txt b/tests/QtCore/CMakeLists.txt index e0624e06f..76db54f25 100644 --- a/tests/QtCore/CMakeLists.txt +++ b/tests/QtCore/CMakeLists.txt @@ -60,6 +60,7 @@ PYSIDE_TEST(qtimer_singleshot_test.py) PYSIDE_TEST(qtimer_timeout_test.py) PYSIDE_TEST(qtnamespace_test.py) PYSIDE_TEST(qurl_test.py) +PYSIDE_TEST(setprop_on_ctor_test.py) PYSIDE_TEST(static_method_test.py) PYSIDE_TEST(static_protected_methods_test.py) PYSIDE_TEST(thread_signals_test.py) diff --git a/tests/QtCore/setprop_on_ctor_test.py b/tests/QtCore/setprop_on_ctor_test.py new file mode 100644 index 000000000..bd4426cd1 --- /dev/null +++ b/tests/QtCore/setprop_on_ctor_test.py @@ -0,0 +1,12 @@ +#!/usr/bin/python +import unittest +from PySide.QtCore import * + + +class SetPropOnCtorTest(unittest.TestCase): + def testIt(self): + obj = QEventTransition(targetStates = [QState()]) + self.assertEqual(len(obj.targetStates()), 1); + +if __name__ == '__main__': + unittest.main() -- cgit v1.2.3