aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoman Lacko <backup.rlacko@gmail.com>2013-05-31 08:34:14 +0200
committerJohn Ehresman <jpe@wingware.com>2013-06-22 23:12:47 +0200
commitc707a7cadd08792d8f9dc23d83fc9a27ba7a7656 (patch)
treeb20fa0b58e63bd93fa89323fc62e5ee19e2d080d /tests
parente35d8904491e9ded4e64c9156e5e9f2b777b399f (diff)
Tell Qt to look for qml imports in the PySide package
Change-Id: Ia7565955f8a3b58c8c57631e13bb56a2793b702a Reviewed-by: John Ehresman <jpe@wingware.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/pysidetest/CMakeLists.txt1
-rw-r--r--tests/pysidetest/utils_test.py43
2 files changed, 44 insertions, 0 deletions
diff --git a/tests/pysidetest/CMakeLists.txt b/tests/pysidetest/CMakeLists.txt
index 78c6f95a1..7097c4e98 100644
--- a/tests/pysidetest/CMakeLists.txt
+++ b/tests/pysidetest/CMakeLists.txt
@@ -89,3 +89,4 @@ PYSIDE_TEST(signalemissionfrompython_test.py)
PYSIDE_TEST(version_test.py)
PYSIDE_TEST(typedef_signal_test.py)
PYSIDE_TEST(bug_1016.py)
+PYSIDE_TEST(utils_test.py)
diff --git a/tests/pysidetest/utils_test.py b/tests/pysidetest/utils_test.py
new file mode 100644
index 000000000..db2189b67
--- /dev/null
+++ b/tests/pysidetest/utils_test.py
@@ -0,0 +1,43 @@
+# This file is part of PySide: Python for Qt
+#
+# Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+#
+# Contact: PySide team <contact@pyside.org>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# version 2 as published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA
+
+import unittest
+import sys
+import os
+
+
+if sys.platform == 'win32':
+ from PySide._utils import _get_win32_case_sensitive_name
+
+ class Win32UtilsTest(unittest.TestCase):
+ def testWin32CaseSensitiveName(self):
+ from tempfile import mkdtemp
+ caseSensitiveName = 'CaseSensitiveName'
+ tmpdir = mkdtemp(caseSensitiveName)
+ try:
+ path = _get_win32_case_sensitive_name(tmpdir.lower())
+ self.assertTrue(path.endswith(caseSensitiveName))
+ finally:
+ if os.path.exists(tmpdir):
+ os.rmdir(tmpdir)
+
+
+if __name__ == '__main__':
+ unittest.main()