diff options
author | bertrand <bertrand.l3f@gmail.com> | 2016-06-13 20:53:10 -0400 |
---|---|---|
committer | bertrand <bertrand.l3f@gmail.com> | 2016-07-17 20:20:39 -0400 |
commit | a05b65337725072710ee00dd695aa2df47eb5b4e (patch) | |
tree | 45da2dda163dbcf299ccefeb3d9f361bec7c6782 /numpy/testing/utils.py | |
parent | a94fd6122aa30b2cf24757c3e3e826d532c7fe6c (diff) | |
download | numpy-a05b65337725072710ee00dd695aa2df47eb5b4e.tar.gz |
MAINT,DOC: add to compat.py3k a function to load modules. Fix some doc for f2py.compile (issue #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 3f4a8568a..447495c50 100644 --- a/numpy/testing/utils.py +++ b/numpy/testing/utils.py @@ -1083,18 +1083,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) |