summaryrefslogtreecommitdiff
path: root/numpy/testing/numpytest.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/testing/numpytest.py')
-rw-r--r--numpy/testing/numpytest.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/numpy/testing/numpytest.py b/numpy/testing/numpytest.py
index 9ddfbdd8c..5fa244726 100644
--- a/numpy/testing/numpytest.py
+++ b/numpy/testing/numpytest.py
@@ -370,6 +370,8 @@ class NumpyTest:
if package_name != name[:len(package_name)] \
or module is None:
continue
+ if not hasattr(module,'__file__'):
+ continue
if os.path.basename(os.path.dirname(module.__file__))=='tests':
continue
modules.append(module)