Commit 74e14a5d authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Skip llvm tests if llvmlite is not installed

parent e87b4daf
...@@ -51,6 +51,7 @@ try: ...@@ -51,6 +51,7 @@ try:
import llvmlite import llvmlite
except ImportError: except ImportError:
collect_ignore += [os.path.join(SCRIPT_FOLDER, 'pystencils_tests/backends/llvm.py')] collect_ignore += [os.path.join(SCRIPT_FOLDER, 'pystencils_tests/backends/llvm.py')]
collect_ignore += [os.path.join(SCRIPT_FOLDER, 'pystencils_tests/test_basic_usage_llvm.ipynb')]
add_path_to_ignore('pystencils/llvm') add_path_to_ignore('pystencils/llvm')
try: try:
......
import numpy as np
import pytest import pytest
try:
from pystencils.llvm.llvmjit import generate_and_jit
from pystencils.llvm import create_kernel, make_python_function
from pystencils.cpu.cpujit import get_llc_command
from pystencils import Assignment, Field, show_code
import numpy as np
except ModuleNotFoundError:
pytest.importorskip("llvmlite")
from pystencils import Assignment, Field, show_code
from pystencils.cpu.cpujit import get_llc_command
from pystencils.llvm import create_kernel, make_python_function
from pystencils.llvm.llvmjit import generate_and_jit
def test_jacobi_fixed_field_size(): def test_jacobi_fixed_field_size():
......
import numpy as np import numpy as np
import pytest
from pystencils import Assignment, Field from pystencils import Assignment, Field
from pystencils.llvm import create_kernel, make_python_function try:
from pystencils.llvm import create_kernel, make_python_function
except ModuleNotFoundError:
pytest.importorskip("llvmlite")
def test_size_check(): def test_size_check():
......
...@@ -30,6 +30,8 @@ def test_sliced_iteration(): ...@@ -30,6 +30,8 @@ def test_sliced_iteration():
def test_sliced_iteration_llvm(): def test_sliced_iteration_llvm():
import pytest
pytest.importorskip("llvmlite")
size = (4, 4) size = (4, 4)
src_arr = np.ones(size) src_arr = np.ones(size)
dst_arr = np.zeros_like(src_arr) dst_arr = np.zeros_like(src_arr)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment