summaryrefslogtreecommitdiffstats
path: root/tests/QtUiTools
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-10-28 17:32:33 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-10-28 17:33:33 -0200
commita1524b78b632d99aa6076391d0d77e46271dd7c8 (patch)
treeb8c057c756bdb5fa5b60bf164f2dd37b8b5125e9 /tests/QtUiTools
parent22eab45ac999b03e2f30d2cf769d3f36450a05cb (diff)
downloadpyside-a1524b78b632d99aa6076391d0d77e46271dd7c8.tar.gz
pyside-a1524b78b632d99aa6076391d0d77e46271dd7c8.tar.xz
pyside-a1524b78b632d99aa6076391d0d77e46271dd7c8.zip
Fix bug#409 - "function -- PySide.QtUiTools.QUiLoader.load(...) -- takes bytes-string (but not unicode-string)"
Reviewer: Renato Ara├║jo <renato.filho@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'tests/QtUiTools')
-rw-r--r--tests/QtUiTools/uiloader_test.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/QtUiTools/uiloader_test.py b/tests/QtUiTools/uiloader_test.py
index fe3725b..0b397a0 100644
--- a/tests/QtUiTools/uiloader_test.py
+++ b/tests/QtUiTools/uiloader_test.py
@@ -25,6 +25,19 @@ class QUioaderTeste(UsesQApplication):
self.assertNotEqual(child, None)
self.assertEqual(w.findChild(QWidget, "grandson_object"), child.findChild(QWidget, "grandson_object"))
+ def testLoadFileUnicodeFilePath(self):
+ filePath = unicode(os.path.join(os.path.dirname(__file__), 'test.ui'))
+ loader = QUiLoader()
+ parent = QWidget()
+ w = loader.load(filePath, parent)
+ self.assertNotEqual(w, None)
+
+ self.assertEqual(len(parent.children()), 1)
+
+ child = w.findChild(QWidget, "child_object")
+ self.assertNotEqual(child, None)
+ self.assertEqual(w.findChild(QWidget, "grandson_object"), child.findChild(QWidget, "grandson_object"))
+
if __name__ == '__main__':
unittest.main()