summaryrefslogtreecommitdiffstats
path: root/tests/QtUiTools
diff options
context:
space:
mode:
authorrenatofilho <renato.filho@openbossa.org>2010-09-22 16:59:04 -0300
committerrenatofilho <renato.filho@openbossa.org>2010-09-22 17:21:02 -0300
commit3525b77d69937938aa285f84b995a3a2d8685cce (patch)
tree38cb2739a70a7c22eaf46161a537fdc8a3ae48b6 /tests/QtUiTools
parentfccfafe71fdf148fca9b6c0c9b09feccd57cf0ec (diff)
downloadpyside-3525b77d69937938aa285f84b995a3a2d8685cce.tar.gz
pyside-3525b77d69937938aa285f84b995a3a2d8685cce.tar.xz
pyside-3525b77d69937938aa285f84b995a3a2d8685cce.zip
Created unit test for bug #376.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'tests/QtUiTools')
-rw-r--r--tests/QtUiTools/CMakeLists.txt1
-rw-r--r--tests/QtUiTools/bug_376.py19
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/QtUiTools/CMakeLists.txt b/tests/QtUiTools/CMakeLists.txt
index 03ce768..9ede81f 100644
--- a/tests/QtUiTools/CMakeLists.txt
+++ b/tests/QtUiTools/CMakeLists.txt
@@ -1,3 +1,4 @@
PYSIDE_TEST(bug_360.py)
+PYSIDE_TEST(bug_376.py)
PYSIDE_TEST(uiloader_test.py)
PYSIDE_TEST(ui_test.py)
diff --git a/tests/QtUiTools/bug_376.py b/tests/QtUiTools/bug_376.py
new file mode 100644
index 0000000..2bd6b5c
--- /dev/null
+++ b/tests/QtUiTools/bug_376.py
@@ -0,0 +1,19 @@
+import unittest
+import os
+from helper import UsesQApplication
+
+from PySide import QtCore, QtGui
+from PySide.QtUiTools import QUiLoader
+
+class BugTest(UsesQApplication):
+ def testCase(self):
+ w = QtGui.QWidget()
+ loader = QUiLoader()
+
+ filePath = os.path.join(os.path.dirname(__file__), 'test.ui')
+ result = loader.load(filePath, w)
+ self.assertEqual(type(result.child_object), QtGui.QFrame)
+
+if __name__ == '__main__':
+ unittest.main()
+