diff options
author | renatofilho <renato.filho@openbossa.org> | 2010-09-20 18:31:29 -0300 |
---|---|---|
committer | renatofilho <renato.filho@openbossa.org> | 2010-09-20 18:32:41 -0300 |
commit | ae44c27bb06c721b783a311111efd66465f681fd (patch) | |
tree | 9b87864ed902e45c4f3fc180fae2314c893919a2 /tests | |
parent | aa47ffd8956c0071f098fac296e9e081729b810a (diff) |
Created unittest for bug 367.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/QtGui/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/QtGui/bug_367.py | 22 |
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt index ea6b4a607..9b928acb8 100644 --- a/tests/QtGui/CMakeLists.txt +++ b/tests/QtGui/CMakeLists.txt @@ -7,6 +7,7 @@ PYSIDE_TEST(bug_307.py) PYSIDE_TEST(bug_324.py) PYSIDE_TEST(bug_338.py) PYSIDE_TEST(bug_363.py) +PYSIDE_TEST(bug_367.py) PYSIDE_TEST(add_action_test.py) PYSIDE_TEST(customproxywidget_test.py) PYSIDE_TEST(float_to_int_implicit_conversion_test.py) diff --git a/tests/QtGui/bug_367.py b/tests/QtGui/bug_367.py new file mode 100644 index 000000000..b27a5523f --- /dev/null +++ b/tests/QtGui/bug_367.py @@ -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() |