X-Git-Url: https://scm.cri.minesparis.psl.eu/git/linpy.git/blobdiff_plain/b7d06b55d601833b4bef47afd732334ed77587fb..e27fd6a18fd36b8ec81f37cd800399703bf7ef4f:/pypol/tests/libhelper.py?ds=sidebyside diff --git a/pypol/tests/libhelper.py b/pypol/tests/libhelper.py new file mode 100644 index 0000000..e75b4fb --- /dev/null +++ b/pypol/tests/libhelper.py @@ -0,0 +1,20 @@ +import functools +import unittest + +try: + + import sympy + + def requires_sympy(func): + @functools.wraps(func) + def wrapper(self): + return func(self) + return wrapper + +except ImportError: + + def requires_sympy(func): + @functools.wraps(func) + def wrapper(self): + raise unittest.SkipTest('SymPy is not available') + return wrapper