From eb0197f78f358f8775a8f5177872eb8cbd66a4e0 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 21 Dec 2009 15:40:19 -0500 Subject: [PATCH] Tag tests with "cl" keyword. --- test/test_wrapper.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test_wrapper.py b/test/test_wrapper.py index a05b97c3..ed12475f 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 -- GitLab