summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristian Maureira-Fredes <cristian.maureira-fredes@qt.io>2018-05-31 18:03:54 +0200
committerCristian Maureira-Fredes <cristian.maureira-fredes@qt.io>2018-06-01 08:48:19 +0000
commitae0aa898a3bc1701499ff7993c8d31bc86eb1675 (patch)
tree9d51e6b22dfe1cbcfc9841ace5086416c957d773
parent677bfb5924c263f8b637cf4aa191268fea2860b9 (diff)
Fix test to assert only if english is the locale
Change-Id: I3188c33414d283478a6ff6d7d354ce9231b4f106 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--sources/pyside2/tests/QtCore/qmimedatabase_test.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/sources/pyside2/tests/QtCore/qmimedatabase_test.py b/sources/pyside2/tests/QtCore/qmimedatabase_test.py
index e523580a..1e4e3b57 100644
--- a/sources/pyside2/tests/QtCore/qmimedatabase_test.py
+++ b/sources/pyside2/tests/QtCore/qmimedatabase_test.py
@@ -52,20 +52,20 @@ class QMimeDatabaseTest(unittest.TestCase):
s1 = db.mimeTypeForName("text/plain")
self.assertTrue(s1.isValid())
self.assertEqual(s1.name(), "text/plain")
- # print("Comment is %s" % s1.comment())
krita = db.mimeTypeForName("application/x-krita")
self.assertTrue(krita.isValid())
- # Test <comment> parsing with application/rdf+xml which has the english comment after the other ones
rdf = db.mimeTypeForName("application/rdf+xml")
self.assertTrue(rdf.isValid())
self.assertEqual(rdf.name(), "application/rdf+xml")
- self.assertEqual(rdf.comment(), "RDF file")
+ if "en" in QLocale().name():
+ self.assertEqual(rdf.comment(), "RDF file")
bzip2 = db.mimeTypeForName("application/x-bzip2")
self.assertTrue(bzip2.isValid())
- self.assertEqual(bzip2.comment(), "Bzip archive")
+ if "en" in QLocale().name():
+ self.assertEqual(bzip2.comment(), "Bzip archive")
defaultMime = db.mimeTypeForName("application/octet-stream")
self.assertTrue(defaultMime.isValid())