aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2017-02-07 17:27:40 +0100
committerChristian Tismer <tismer@stackless.com>2017-02-08 10:09:33 +0000
commit645f6bf9662a049f6f30f5ff66236e963af0721a (patch)
treed995c1b0acf26d0d2ff6412e81bc15489c009970
parent02b853111cccc85f52caebc1ea5d1c76b05eacd8 (diff)
Remove some simple QUuid errors
Some tests don’t work since QUuid can not currently be supported I added some conditional. It will be automatically enabled, when a platform is able to support it. Change-Id: Ic6b8b71d2c947aa3620e82a6bcc4fecfef6ee533 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r--tests/QtCore/deepcopy_test.py7
-rw-r--r--tests/QtCore/repr_test.py7
2 files changed, 12 insertions, 2 deletions
diff --git a/tests/QtCore/deepcopy_test.py b/tests/QtCore/deepcopy_test.py
index e6f4fe17..9d811744 100644
--- a/tests/QtCore/deepcopy_test.py
+++ b/tests/QtCore/deepcopy_test.py
@@ -31,7 +31,11 @@ from copy import deepcopy
from PySide2.QtCore import QByteArray, QDate, QDateTime, QTime, QLine, QLineF
from PySide2.QtCore import Qt, QSize, QSizeF, QRect, QRectF, QDir, QPoint, QPointF
-from PySide2.QtCore import QUuid
+try:
+ from PySide2.QtCore import QUuid
+ HAVE_Q = True
+except ImportError:
+ HAVE_Q = False
class DeepCopyHelper:
def testCopy(self):
@@ -99,6 +103,7 @@ class QDirDeepCopy(DeepCopyHelper, unittest.TestCase):
self.original = QDir("./")
class QUuiCopy(DeepCopyHelper, unittest.TestCase):
+ @unittest.skipUnless(HAVE_Q, "QUuid is currently not supported on this platform.")
def setUp(self):
self.original = QUuid("67C8770B-44F1-410A-AB9A-F9B5446F13EE")
diff --git a/tests/QtCore/repr_test.py b/tests/QtCore/repr_test.py
index a32ec7d8..29796020 100644
--- a/tests/QtCore/repr_test.py
+++ b/tests/QtCore/repr_test.py
@@ -31,7 +31,11 @@ import unittest
from PySide2.QtCore import QByteArray, QDate, QDateTime, QTime, QLine, QLineF
from PySide2.QtCore import Qt, QSize, QSizeF, QRect, QRectF, QPoint, QPointF
-from PySide2.QtCore import QUuid
+try:
+ from PySide2.QtCore import QUuid
+ HAVE_Q = True
+except ImportError:
+ HAVE_Q = False
class ReprCopyHelper:
def testCopy(self):
@@ -93,6 +97,7 @@ class QPointFReprCopy(ReprCopyHelper, unittest.TestCase):
self.original = QPointF(1.1, 2.2)
class QUuiCopy(ReprCopyHelper, unittest.TestCase):
+ @unittest.skipUnless(HAVE_Q, "QUuid is currently not supported on this platform.")
def setUp(self):
self.original = QUuid("67C8770B-44F1-410A-AB9A-F9B5446F13EE")