aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/QtWidgets/bug_793.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/tests/QtWidgets/bug_793.py')
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_793.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/sources/pyside6/tests/QtWidgets/bug_793.py b/sources/pyside6/tests/QtWidgets/bug_793.py
index 08c060f15..40e3f85da 100644
--- a/sources/pyside6/tests/QtWidgets/bug_793.py
+++ b/sources/pyside6/tests/QtWidgets/bug_793.py
@@ -38,27 +38,32 @@ init_test_paths(False)
from PySide6.QtCore import QTimer
from PySide6.QtWidgets import QWidget, QApplication
+
class TestW1(QWidget):
- def __init__(self, parent = None):
+ def __init__(self, parent=None):
super().__init__(parent)
TestW2(parent, self)
+
class TestW2(QWidget):
- def __init__(self, ancestor, parent = None):
+ def __init__(self, ancestor, parent=None):
super().__init__(parent)
self.ancestor_ref = ancestor
+
class Test(QWidget):
def __init__(self):
super().__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()