Skip to content
Snippets Groups Projects
Commit 401d0933 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Some test fixes/loosened error bounds.

parent dfb4152c
No related branches found
No related tags found
No related merge requests found
......@@ -29,21 +29,12 @@ import pytools.test
from pytools import memoize
from test_array import general_clrand
def have_cl():
try:
import pyopencl
return True
except:
return False
if have_cl():
import pyopencl as cl
import pyopencl.array as cl_array
import pyopencl.tools as cl_tools
from pyopencl.tools import pytest_generate_tests_for_pyopencl \
as pytest_generate_tests
from pyopencl.characterize import has_double_support
import pyopencl as cl
import pyopencl.array as cl_array
import pyopencl.tools as cl_tools
from pyopencl.tools import pytest_generate_tests_for_pyopencl \
as pytest_generate_tests
from pyopencl.characterize import has_double_support
......@@ -579,6 +570,9 @@ def test_partition(ctx_factory):
@pytools.test.mark_test.opencl
def test_unique(ctx_factory):
from pytest import importorskip
importorskip("mako")
context = ctx_factory()
queue = cl.CommandQueue(context)
......@@ -835,10 +829,6 @@ def test_key_value_sorter(ctx_factory):
if __name__ == "__main__":
# make sure that import failures get reported, instead of skipping the
# tests.
import pyopencl as cl
import sys
if len(sys.argv) > 1:
exec(sys.argv[1])
......
......@@ -118,8 +118,8 @@ if have_cl():
test_cos = make_unary_function_test("cos", (-10, 10), 2e-7, use_complex=2e-2)
test_asin = make_unary_function_test("asin", (-0.9, 0.9), 5e-7)
test_acos = make_unary_function_test("acos", (-0.9, 0.9), 5e-7)
test_tan = make_unary_function_test("tan",
(-math.pi/2 + 0.1, math.pi/2 - 0.1), 2e-5, use_complex=True)
test_tan = make_unary_function_test("tan",
(-math.pi/2 + 0.1, math.pi/2 - 0.1), 4e-5, use_complex=True)
test_atan = make_unary_function_test("atan", (-10, 10), 2e-7)
test_sinh = make_unary_function_test("sinh", (-3, 3), 2e-6, use_complex=2e-3)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment