diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2016-07-18 17:58:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-18 17:58:27 -0500 |
commit | 055056a3108ab19883e50ac125ab9974823498c7 (patch) | |
tree | 55972abec67d5ec8f1bec9075dd0f70fb000f628 /numpy/testing/utils.py | |
parent | 3a94389f5c76a8ea45f160582681aaa3e7eef0e1 (diff) | |
parent | a05b65337725072710ee00dd695aa2df47eb5b4e (diff) | |
download | numpy-055056a3108ab19883e50ac125ab9974823498c7.tar.gz |
Merge pull request #7791 from bertrand-l/feature/f2py-issues-7683
f2py.compile issues (#7683)
Diffstat (limited to 'numpy/testing/utils.py')
-rw-r--r-- | numpy/testing/utils.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py index dfed5d148..dc1115e1b 100644 --- a/numpy/testing/utils.py +++ b/numpy/testing/utils.py @@ -1088,18 +1088,13 @@ def rundocs(filename=None, raise_on_error=True): >>> np.lib.test(doctests=True) #doctest: +SKIP """ + from numpy.compat import npy_load_module import doctest - import imp if filename is None: f = sys._getframe(1) filename = f.f_globals['__file__'] name = os.path.splitext(os.path.basename(filename))[0] - path = [os.path.dirname(filename)] - file, pathname, description = imp.find_module(name, path) - try: - m = imp.load_module(name, file, pathname, description) - finally: - file.close() + m = npy_load_module(name, filename) tests = doctest.DocTestFinder().find(m) runner = doctest.DocTestRunner(verbose=False) |