Create unit test for bug #793.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Hugo Parente <hugo.lima@openbossa.org>
This commit is contained in:
parent
1067faec16
commit
21786216f2
2 changed files with 31 additions and 0 deletions
|
|
@ -46,6 +46,7 @@ PYSIDE_TEST(bug_693.py)
|
||||||
PYSIDE_TEST(bug_714.py)
|
PYSIDE_TEST(bug_714.py)
|
||||||
PYSIDE_TEST(bug_728.py)
|
PYSIDE_TEST(bug_728.py)
|
||||||
PYSIDE_TEST(bug_736.py)
|
PYSIDE_TEST(bug_736.py)
|
||||||
|
PYSIDE_TEST(bug_793.py)
|
||||||
PYSIDE_TEST(customproxywidget_test.py)
|
PYSIDE_TEST(customproxywidget_test.py)
|
||||||
PYSIDE_TEST(deepcopy_test.py)
|
PYSIDE_TEST(deepcopy_test.py)
|
||||||
PYSIDE_TEST(float_to_int_implicit_conversion_test.py)
|
PYSIDE_TEST(float_to_int_implicit_conversion_test.py)
|
||||||
|
|
|
||||||
30
tests/QtGui/bug_793.py
Normal file
30
tests/QtGui/bug_793.py
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
import unittest
|
||||||
|
import sys
|
||||||
|
from PySide.QtCore import QTimer
|
||||||
|
from PySide.QtGui import QWidget, QApplication
|
||||||
|
|
||||||
|
class TestW1(QWidget):
|
||||||
|
def __init__(self, parent = None):
|
||||||
|
super(TestW1, self).__init__(parent)
|
||||||
|
TestW2(parent, self)
|
||||||
|
|
||||||
|
class TestW2(QWidget):
|
||||||
|
def __init__(self, ancestor, parent = None):
|
||||||
|
super(TestW2, self).__init__(parent)
|
||||||
|
self.ancestor_ref = ancestor
|
||||||
|
|
||||||
|
class Test(QWidget):
|
||||||
|
def __init__(self):
|
||||||
|
super(Test, self).__init__()
|
||||||
|
TestW1(self)
|
||||||
|
|
||||||
|
class TestQApplicationDestrcutor(unittest.TestCase):
|
||||||
|
def testDestructor(self):
|
||||||
|
w = Test()
|
||||||
|
w.show()
|
||||||
|
QTimer.singleShot(0, w.close)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
app = QApplication(sys.argv)
|
||||||
|
unittest.main()
|
||||||
|
sys.exit(app.exec_())
|
||||||
Loading…
Add table
Add a link
Reference in a new issue