summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 36b8776..f4f38a6 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 0000000..9816b3e
--- /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()