Created unit test for bug #711.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Lauro Moura <lauro.neto@openbossa.org>
This commit is contained in:
parent
9a7733ef8c
commit
b1a1f61c64
1 changed files with 21 additions and 0 deletions
21
tests/QtGui/bug_711.py
Normal file
21
tests/QtGui/bug_711.py
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
import unittest
|
||||||
|
import sys
|
||||||
|
from PySide.QtGui import QToolBar, QApplication, QAction, QToolButton
|
||||||
|
|
||||||
|
class TestLabelPixmap(unittest.TestCase):
|
||||||
|
def testReference(self):
|
||||||
|
toolbar = QToolBar()
|
||||||
|
|
||||||
|
for i in xrange(20):
|
||||||
|
toolbar.addAction(QAction("Action %d" % i, None))
|
||||||
|
|
||||||
|
buttons = toolbar.findChildren(QToolButton, "")
|
||||||
|
toolbar.clear()
|
||||||
|
|
||||||
|
for b in buttons:
|
||||||
|
self.assertRaises(RuntimeError, b.objectName)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
app = QApplication([])
|
||||||
|
unittest.main()
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue