Created unittest for bug #505.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
This commit is contained in:
parent
ffc853c88b
commit
fd9c8c8d76
2 changed files with 23 additions and 0 deletions
|
|
@ -3,6 +3,7 @@ PYSIDE_TEST(bug_332.py)
|
||||||
PYSIDE_TEST(bug_408.py)
|
PYSIDE_TEST(bug_408.py)
|
||||||
PYSIDE_TEST(bug_428.py)
|
PYSIDE_TEST(bug_428.py)
|
||||||
PYSIDE_TEST(bug_462.py)
|
PYSIDE_TEST(bug_462.py)
|
||||||
|
PYSIDE_TEST(bug_505.py)
|
||||||
PYSIDE_TEST(blocking_signals_test.py)
|
PYSIDE_TEST(blocking_signals_test.py)
|
||||||
PYSIDE_TEST(child_event_test.py)
|
PYSIDE_TEST(child_event_test.py)
|
||||||
PYSIDE_TEST(deepcopy_test.py)
|
PYSIDE_TEST(deepcopy_test.py)
|
||||||
|
|
|
||||||
22
tests/QtCore/bug_505.py
Normal file
22
tests/QtCore/bug_505.py
Normal file
|
|
@ -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()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue