aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-04-25 10:00:17 +0200
committerLiang Qi <liang.qi@qt.io>2017-04-26 15:07:26 +0000
commit69857258ff108aba1a4d5ba953687b02751fbbd9 (patch)
treeb2f2410ad7e38e2450df801a2209e8a8cb907420
parent4091470af05caaf43b3e5b019b32d2e8eb1cf876 (diff)
tests: add a test function for QUrl::path()
Task-number: PYSIDE-338 Change-Id: Ie76a4187db17c7ea9232d2992e606135f188bc51 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--tests/QtCore/qurl_test.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/QtCore/qurl_test.py b/tests/QtCore/qurl_test.py
index 9d0327af..595e5931 100644
--- a/tests/QtCore/qurl_test.py
+++ b/tests/QtCore/qurl_test.py
@@ -67,6 +67,10 @@ class QUrlBasicConstructor(unittest.TestCase):
self.assertEqual(url.toString(),
'ftp://john:abc123@www.google.com:8080/mail/view')
+ def testPath(self):
+ url = QUrl("http://qt-project.org/images/ban/pgs_front.jpg")
+ self.assertEqual(url.path(), "/images/ban/pgs_front.jpg")
+
# PYSIDE-345: No bindings for QUrlQuery
# class QueryItemsTest(unittest.TestCase):
# '''Test query item management'''