Created unit test for bug #1002.
Reviewer: Hugo Parente <hugo.lima@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
This commit is contained in:
parent
e92b601620
commit
846759b324
2 changed files with 20 additions and 0 deletions
|
|
@ -77,6 +77,7 @@ PYSIDE_TEST(bug_979.py)
|
||||||
PYSIDE_TEST(bug_988.py)
|
PYSIDE_TEST(bug_988.py)
|
||||||
PYSIDE_TEST(bug_991.py)
|
PYSIDE_TEST(bug_991.py)
|
||||||
PYSIDE_TEST(bug_998.py)
|
PYSIDE_TEST(bug_998.py)
|
||||||
|
PYSIDE_TEST(bug_1002.py)
|
||||||
PYSIDE_TEST(customproxywidget_test.py)
|
PYSIDE_TEST(customproxywidget_test.py)
|
||||||
PYSIDE_TEST(deepcopy_test.py)
|
PYSIDE_TEST(deepcopy_test.py)
|
||||||
PYSIDE_TEST(event_filter_test.py)
|
PYSIDE_TEST(event_filter_test.py)
|
||||||
|
|
|
||||||
19
tests/QtGui/bug_1002.py
Normal file
19
tests/QtGui/bug_1002.py
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
import unittest
|
||||||
|
import sys
|
||||||
|
from PySide.QtGui import QWidget, QPushButton
|
||||||
|
|
||||||
|
from helper import UsesQApplication
|
||||||
|
|
||||||
|
class TestBug1002 (UsesQApplication):
|
||||||
|
def testReturnWindow(self):
|
||||||
|
widget = QWidget()
|
||||||
|
button = QPushButton(widget)
|
||||||
|
self.assertEqual(sys.getrefcount(widget), 2)
|
||||||
|
window = button.window()
|
||||||
|
self.assertEqual(sys.getrefcount(widget), 3)
|
||||||
|
self.assertEqual(sys.getrefcount(window), 3)
|
||||||
|
|
||||||
|
del widget
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue