aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtCore
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtCore')
-rw-r--r--tests/QtCore/CMakeLists.txt1
-rw-r--r--tests/QtCore/qobject_objectproperty_test.py29
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/QtCore/CMakeLists.txt b/tests/QtCore/CMakeLists.txt
index 76db54f25..210aa01de 100644
--- a/tests/QtCore/CMakeLists.txt
+++ b/tests/QtCore/CMakeLists.txt
@@ -34,6 +34,7 @@ PYSIDE_TEST(qobject_connect_notify_test.py)
PYSIDE_TEST(qobject_destructor.py)
PYSIDE_TEST(qobject_event_filter_test.py)
PYSIDE_TEST(qobject_inherits_test.py)
+PYSIDE_TEST(qobject_objectproperty_test.py)
PYSIDE_TEST(qobject_parent_test.py)
PYSIDE_TEST(qobject_property_test.py)
PYSIDE_TEST(qobject_protected_methods_test.py)
diff --git a/tests/QtCore/qobject_objectproperty_test.py b/tests/QtCore/qobject_objectproperty_test.py
new file mode 100644
index 000000000..2456b82cf
--- /dev/null
+++ b/tests/QtCore/qobject_objectproperty_test.py
@@ -0,0 +1,29 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+'''Test case for the bug #378
+http://bugs.openbossa.org/show_bug.cgi?id=378
+'''
+
+import unittest
+from PySide.QtCore import QObject
+
+class ExtQObject(QObject):
+ def __init__(self):
+ # "foobar" will become a object attribute that will not be
+ # listed on the among the type attributes. Thus for bug
+ # condition be correctly triggered the "foobar" attribute
+ # must not previously exist in the parent class.
+ self.foobar = None
+ # The parent __init__ method must be called after the
+ # definition of "self.foobar".
+ QObject.__init__(self)
+
+class TestBug378(unittest.TestCase):
+ '''Test case for the bug #378'''
+
+ def testBug378(self):
+ obj = ExtQObject()
+
+if __name__ == '__main__':
+ unittest.main()
+