summaryrefslogtreecommitdiff
path: root/numpy/random/tests/test_direct.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/random/tests/test_direct.py')
-rw-r--r--numpy/random/tests/test_direct.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/numpy/random/tests/test_direct.py b/numpy/random/tests/test_direct.py
index 34d7bd278..9f77f0ad2 100644
--- a/numpy/random/tests/test_direct.py
+++ b/numpy/random/tests/test_direct.py
@@ -1,5 +1,6 @@
import os
from os.path import join
+import sys
import numpy as np
from numpy.testing import (assert_equal, assert_allclose, assert_array_equal,
@@ -26,6 +27,12 @@ try:
except ImportError:
MISSING_CTYPES = False
+if sys.flags.optimize > 1:
+ # no docstrings present to inspect when PYTHONOPTIMIZE/Py_OptimizeFlag > 1
+ # cffi cannot succeed
+ MISSING_CFFI = True
+
+
pwd = os.path.dirname(os.path.abspath(__file__))