aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-09-15 10:44:27 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2010-09-15 11:33:41 -0300
commit87ea5d920c62eed3e9c1185fa66740c13c71f65b (patch)
tree4653548a4b7050c85f481864c5c8d8d42bb4a975 /tests
parentcd7dac40f758f821514693c6d7d4c449a9f81240 (diff)
Fix bug#347 - "Setting properties in constructors gives incorrect results"
Added new function to libpyside: "fillQtProperties". Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/QtCore/CMakeLists.txt1
-rw-r--r--tests/QtCore/setprop_on_ctor_test.py12
2 files changed, 13 insertions, 0 deletions
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()