aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorrenatofilho <renato.filho@openbossa.org>2010-10-29 14:08:34 -0300
committerrenatofilho <renato.filho@openbossa.org>2010-10-29 16:24:18 -0300
commit62fd909705a4bf99590346712b040f7b40c9bb74 (patch)
treee9d581d4dec9c4826b8f769374159efbcb4aed47 /tests
parent7a439f4d21b08b0ef9b7344ee61dd55f71b13ed6 (diff)
Created unit test for bug 428.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/QtCore/CMakeLists.txt1
-rw-r--r--tests/QtCore/bug_428.py18
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/QtCore/CMakeLists.txt b/tests/QtCore/CMakeLists.txt
index 36b8776f5..f4f38a61c 100644
--- a/tests/QtCore/CMakeLists.txt
+++ b/tests/QtCore/CMakeLists.txt
@@ -1,6 +1,7 @@
PYSIDE_TEST(bug_278_test.py)
PYSIDE_TEST(bug_332.py)
PYSIDE_TEST(bug_408.py)
+PYSIDE_TEST(bug_428.py)
PYSIDE_TEST(blocking_signals_test.py)
PYSIDE_TEST(child_event_test.py)
PYSIDE_TEST(deepcopy_test.py)
diff --git a/tests/QtCore/bug_428.py b/tests/QtCore/bug_428.py
new file mode 100644
index 000000000..9816b3e92
--- /dev/null
+++ b/tests/QtCore/bug_428.py
@@ -0,0 +1,18 @@
+import unittest
+
+from PySide.QtCore import QObject
+
+class MyBaseObject(QObject):
+ def __init__(self, number):
+ self.myMember = 'myMember' + number
+ QObject.__init__(self)
+
+class QObjectConstructorTest(unittest.TestCase):
+ def testBug(self):
+ for i in range(10):
+ number = str(i)
+ obj = MyBaseObject(number)
+ self.assertEqual(obj.myMember, 'myMember' + number)
+
+if __name__ == '__main__':
+ unittest.main()