diff options
Diffstat (limited to 'tests/QtGui/bug_512.py')
-rw-r--r-- | tests/QtGui/bug_512.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/QtGui/bug_512.py b/tests/QtGui/bug_512.py new file mode 100644 index 000000000..386a7f960 --- /dev/null +++ b/tests/QtGui/bug_512.py @@ -0,0 +1,22 @@ +''' Test bug 512: http://bugs.openbossa.org/show_bug.cgi?id=512''' + +import unittest +from helper import UsesQApplication +from PySide.QtCore import * +from PySide.QtGui import * + +class BugTest(UsesQApplication): + def testCase(self): + w = QWidget(None) + lbl = QLabel("Hello", w); + g = QGridLayout() + g.addWidget(lbl, 0, 0) + w.setLayout(g) + w.show() + + t = g.getItemPosition(0) + self.assertEqual(type(t), tuple) + self.assertEqual(t, (0,0,1,1)) + +if __name__ == '__main__': + unittest.main() |