Skip to content

Commit

Permalink
Skip test if sympy not found
Browse files Browse the repository at this point in the history
  • Loading branch information
isuruf authored Mar 20, 2023
1 parent 2eae018 commit c0a4523
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion symengine/tests/test_matrices.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
HAVE_NUMPY = True
except ImportError:
HAVE_NUMPY = False

try:
import sympy
from sympy.core.cache import clear_cache
import atexit
atexit.register(clear_cache)
have_sympy = True
except ImportError:
have_sympy = False


def test_init():
Expand Down Expand Up @@ -742,7 +751,7 @@ def test_repr_latex():
assert isinstance(latex_string, str)
init_printing(False)


@unittest.skipIf(not have_sympy, "SymPy not installed")
def test_simplify():
A = ImmutableMatrix([1])
assert type(A.simplify()) == type(A)

0 comments on commit c0a4523

Please sign in to comment.