diff --git a/test/test_wrapper.py b/test/test_wrapper.py index a05b97c3ff7974308ba76d1d0c12a5ae8a7487a3..ed12475fee58e933891bd9224793074d602ae7e5 100644 --- a/test/test_wrapper.py +++ b/test/test_wrapper.py @@ -1,6 +1,7 @@ from __future__ import division import numpy import numpy.linalg as la +from py.test import mark as mark_test @@ -23,6 +24,7 @@ if have_cl(): class TestCL: disabled = not have_cl() + @mark_test.cl def test_get_info(self, platform, device): had_failures = [False] @@ -152,6 +154,7 @@ class TestCL: if had_failures[0]: raise RuntimeError("get_info testing had errors") + @mark_test.cl def test_invalid_kernel_names_cause_failures(self): for platform in cl.get_platforms(): for device in platform.get_devices(): @@ -167,6 +170,7 @@ class TestCL: except AttributeError: pass + @mark_test.cl def test_image_format_constructor(self): # doesn't need image support to succeed iform = cl.ImageFormat(cl.channel_order.RGBA, cl.channel_type.FLOAT) @@ -175,6 +179,7 @@ class TestCL: assert iform.channel_data_type == cl.channel_type.FLOAT assert not iform.__dict__ + @mark_test.cl def test_nonempty_supported_image_formats(self, device, context): if device.image_support: assert len(cl.get_supported_image_formats( @@ -183,6 +188,7 @@ class TestCL: from py.test import skip skip("images not supported on %s" % device.name) + @mark_test.cl def test_that_python_args_fail(self, context): prg = cl.Program(context, """ __kernel void mult(__global float *a, float b, int c) @@ -211,6 +217,7 @@ class TestCL: a_result = numpy.empty_like(a) cl.enqueue_read_buffer(queue, a_buf, a_result).wait() + @mark_test.cl def test_image_2d(self, device, context): if not device.image_support: from py.test import skip