diff options
author | mattip <matti.picus@gmail.com> | 2019-11-21 13:01:39 -0800 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2019-11-21 13:01:39 -0800 |
commit | 29b9d3bc0f49d7eaff6a9649c26c18b7a156b902 (patch) | |
tree | ba66edaac76bc9bbefbf739a6b66e540e4e5ad1d /numpy/random/tests | |
parent | d428127183d46b2fbd99afefa4670642addf8d6e (diff) | |
download | numpy-29b9d3bc0f49d7eaff6a9649c26c18b7a156b902.tar.gz |
TST. API: test using distributions.h via cffi
Diffstat (limited to 'numpy/random/tests')
-rw-r--r-- | numpy/random/tests/test_extending.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/numpy/random/tests/test_extending.py b/numpy/random/tests/test_extending.py index 6f0f7a462..607853663 100644 --- a/numpy/random/tests/test_extending.py +++ b/numpy/random/tests/test_extending.py @@ -3,11 +3,15 @@ import pytest import warnings try: + import cffi +except ImportError: + cffi = None + +try: with warnings.catch_warnings(record=True) as w: # numba issue gh-4733 warnings.filterwarnings('always', '', DeprecationWarning) import numba - import cffi except ImportError: numba = None @@ -26,7 +30,11 @@ def test_cython(): sys.argv = argv os.chdir(curdir) -@pytest.mark.skipif(numba is None, reason="requires numba") +@pytest.mark.skipif(numba is None or cffi is None, + reason="requires numba and cffi") def test_numba(): from numpy.random._examples.numba import extending +@pytest.mark.skipif(cffi is None, reason="requires cffi") +def test_cffi(): + from numpy.random._examples.cffi import extending |