diff options
Diffstat (limited to 'sources/pyside6/tests/QtWidgets/bug_1006.py')
-rw-r--r-- | sources/pyside6/tests/QtWidgets/bug_1006.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sources/pyside6/tests/QtWidgets/bug_1006.py b/sources/pyside6/tests/QtWidgets/bug_1006.py index 96231ddc3..7aaff11c1 100644 --- a/sources/pyside6/tests/QtWidgets/bug_1006.py +++ b/sources/pyside6/tests/QtWidgets/bug_1006.py @@ -41,6 +41,7 @@ from PySide6.QtWidgets import QDialog, QLabel, QGridLayout, QHBoxLayout, QWidget from helper.timedqapplication import TimedQApplication + class LabelWindow(QDialog): def __init__(self, parent): super().__init__(parent) @@ -51,7 +52,6 @@ class LabelWindow(QDialog): self.setLayout(self.test_layout) self._destroyCalled = False - def replace(self, unit): old_item = self.test_layout.itemAtPosition(0, 0) old_label = old_item.widget() @@ -69,6 +69,7 @@ class LabelWindow(QDialog): def _destroyed(self, obj): self._destroyCalled = True + class TestBug1006 (TimedQApplication): def testLayoutItemLifeTime(self): @@ -113,5 +114,6 @@ class TestBug1006 (TimedQApplication): widget.setObjectName("MyWidget") self.assertEqual(sys.getrefcount(widget), 3) + if __name__ == "__main__": unittest.main() |