diff options
author | Renato Araujo Oliveira Filho <renato.filho@openbossa.org> | 2010-12-14 17:43:01 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:47:58 -0300 |
commit | 0229e5413b18df40d76d152074e24a548fdbab69 (patch) | |
tree | 4221ddf90182dd57efd8b742c8ccd1b8d17763fa | |
parent | 26d2bd6a7c50f93ef61845e2c9751205a6c2f912 (diff) |
Created unittest for bug #505.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
-rw-r--r-- | tests/QtCore/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/QtCore/bug_505.py | 22 |
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/QtCore/CMakeLists.txt b/tests/QtCore/CMakeLists.txt index 40b83864d..b5bffe77e 100644 --- a/tests/QtCore/CMakeLists.txt +++ b/tests/QtCore/CMakeLists.txt @@ -3,6 +3,7 @@ PYSIDE_TEST(bug_332.py) PYSIDE_TEST(bug_408.py) PYSIDE_TEST(bug_428.py) PYSIDE_TEST(bug_462.py) +PYSIDE_TEST(bug_505.py) PYSIDE_TEST(blocking_signals_test.py) PYSIDE_TEST(child_event_test.py) PYSIDE_TEST(deepcopy_test.py) diff --git a/tests/QtCore/bug_505.py b/tests/QtCore/bug_505.py new file mode 100644 index 000000000..5fbaa4fe0 --- /dev/null +++ b/tests/QtCore/bug_505.py @@ -0,0 +1,22 @@ +import unittest + +from PySide.QtCore import QObject + +class MyBaseObject(QObject): + def __init__(self, parent=None): + QObject.__init__(self, parent) + self.setObjectName("PySide") + + def __del__(self): + if self.objectName() != "PySide": + raise NameError('Fail') + +class CheckForEventsTypes(unittest.TestCase): + def testDelObject(self): + p = MyBaseObject() + o = MyBaseObject(p) + del o + del p + +if __name__ == '__main__': + unittest.main() |