summaryrefslogtreecommitdiff
path: root/numpy/random/tests
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2019-11-21 13:01:39 -0800
committermattip <matti.picus@gmail.com>2019-11-21 13:01:39 -0800
commit29b9d3bc0f49d7eaff6a9649c26c18b7a156b902 (patch)
treeba66edaac76bc9bbefbf739a6b66e540e4e5ad1d /numpy/random/tests
parentd428127183d46b2fbd99afefa4670642addf8d6e (diff)
downloadnumpy-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.py12
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