Created unittest for bug #505.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
This commit is contained in:
parent
26d2bd6a7c
commit
0229e5413b
2 changed files with 23 additions and 0 deletions
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