summaryrefslogtreecommitdiff
path: root/tests/test_everything.py
diff options
context:
space:
mode:
authorChristoph Reiter <creiter@src.gnome.org>2017-04-02 10:54:48 +0200
committerChristoph Reiter <creiter@src.gnome.org>2017-04-02 10:54:48 +0200
commit7c774ce5ce9ec5cda61e10a704b28f0b82df1b03 (patch)
treeef2f615be8604df035d659c2816afc2ca77ec2f9 /tests/test_everything.py
parentc2be3cbefbbacb52758b49338be61d093a896d09 (diff)
downloadpygobject-7c774ce5ce9ec5cda61e10a704b28f0b82df1b03.tar.gz
tests: Don't skip Regress tests when cairo is missing
Since https://git.gnome.org/browse/pygobject/commit/?id=a731db5908b79b97277be4f5138b46010c2dd616 we build libregress even if cairo is missing. Instead of skipping regress tests when cairo is missing only skip cairo relate tests now.
Diffstat (limited to 'tests/test_everything.py')
-rw-r--r--tests/test_everything.py17
1 files changed, 1 insertions, 16 deletions
diff --git a/tests/test_everything.py b/tests/test_everything.py
index b6405c1b..03787816 100644
--- a/tests/test_everything.py
+++ b/tests/test_everything.py
@@ -8,14 +8,7 @@ import ctypes
import warnings
import sys
-try:
- import cairo
- cairo # Pyflakes
- has_cairo = True
- from gi.repository import Regress as Everything
-except ImportError:
- has_cairo = False
-
+from gi.repository import Regress as Everything
from gi.repository import GObject
from gi.repository import GLib
from gi.repository import Gio
@@ -53,7 +46,6 @@ class RawGList(ctypes.Structure):
return ctypes.POINTER(cls).from_address(id(obj) + offset)
-@unittest.skipUnless(has_cairo, 'built without cairo support')
class TestInstanceTransfer(unittest.TestCase):
def test_main(self):
@@ -62,7 +54,6 @@ class TestInstanceTransfer(unittest.TestCase):
obj.instance_method_full()
-@unittest.skipUnless(has_cairo, 'built without cairo support')
class TestEverything(unittest.TestCase):
def test_bool(self):
@@ -578,7 +569,6 @@ class TestEverything(unittest.TestCase):
self.assertTrue('test_everything.py", line' in tb, tb)
-@unittest.skipUnless(has_cairo, 'built without cairo support')
class TestNullableArgs(unittest.TestCase):
def test_in_nullable_hash(self):
Everything.test_ghash_null_in(None)
@@ -616,7 +606,6 @@ class TestNullableArgs(unittest.TestCase):
self.assertEqual(None, Everything.TestObj.null_out())
-@unittest.skipUnless(has_cairo, 'built without cairo support')
class TestCallbacks(unittest.TestCase):
called = False
main_loop = GLib.MainLoop()
@@ -1025,7 +1014,6 @@ class TestCallbacks(unittest.TestCase):
self.assertEqual(mydict, {'foo': 1, 'bar': 2, 'new': 42})
-@unittest.skipUnless(has_cairo, 'built without cairo support')
class TestClosures(unittest.TestCase):
def test_no_arg(self):
def callback():
@@ -1086,7 +1074,6 @@ class TestClosures(unittest.TestCase):
self.assertTrue('return value' in str(exc[0].value), exc[0].value)
-@unittest.skipUnless(has_cairo, 'built without cairo support')
class TestBoxed(unittest.TestCase):
def test_boxed(self):
object_ = Everything.TestObj()
@@ -1137,7 +1124,6 @@ class TestBoxed(unittest.TestCase):
self.assertNotEqual(id(boxed), id(copy))
-@unittest.skipUnless(has_cairo, 'built without cairo support')
class TestTortureProfile(unittest.TestCase):
def test_torture_profile(self):
import time
@@ -1200,7 +1186,6 @@ class TestTortureProfile(unittest.TestCase):
print("\tTotal: %f sec" % total_time)
-@unittest.skipUnless(has_cairo, 'built without cairo support')
class TestAdvancedInterfaces(unittest.TestCase):
def test_array_objs(self):
obj1, obj2 = Everything.test_array_fixed_out_objects()