Created unittest for bug 367.
This commit is contained in:
parent
aa47ffd895
commit
ae44c27bb0
2 changed files with 23 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ PYSIDE_TEST(bug_307.py)
|
||||||
PYSIDE_TEST(bug_324.py)
|
PYSIDE_TEST(bug_324.py)
|
||||||
PYSIDE_TEST(bug_338.py)
|
PYSIDE_TEST(bug_338.py)
|
||||||
PYSIDE_TEST(bug_363.py)
|
PYSIDE_TEST(bug_363.py)
|
||||||
|
PYSIDE_TEST(bug_367.py)
|
||||||
PYSIDE_TEST(add_action_test.py)
|
PYSIDE_TEST(add_action_test.py)
|
||||||
PYSIDE_TEST(customproxywidget_test.py)
|
PYSIDE_TEST(customproxywidget_test.py)
|
||||||
PYSIDE_TEST(float_to_int_implicit_conversion_test.py)
|
PYSIDE_TEST(float_to_int_implicit_conversion_test.py)
|
||||||
|
|
|
||||||
22
tests/QtGui/bug_367.py
Normal file
22
tests/QtGui/bug_367.py
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
''' Test bug 367: http://bugs.openbossa.org/show_bug.cgi?id=367'''
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import unittest
|
||||||
|
from helper import UsesQApplication
|
||||||
|
from PySide import QtCore,QtGui
|
||||||
|
|
||||||
|
class BugTest(UsesQApplication):
|
||||||
|
def testCase(self):
|
||||||
|
model = QtGui.QStandardItemModel()
|
||||||
|
parentItem = model.invisibleRootItem()
|
||||||
|
for i in range(10):
|
||||||
|
item = QtGui.QStandardItem()
|
||||||
|
rcount = sys.getrefcount(item)
|
||||||
|
parentItem.appendRow(item)
|
||||||
|
self.assertEqual(rcount+1, sys.getrefcount(item))
|
||||||
|
parentItem = item
|
||||||
|
|
||||||
|
self.assert_(True)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue