diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2018-04-02 15:48:20 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2018-04-04 06:40:28 -0600 |
commit | cf46d8cd2aa809be44b684ba234880e0aa4befe9 (patch) | |
tree | a088359008c9264d9ca6bbe7fe34c2c4440481a3 /numpy/__init__.py | |
parent | 7e5a41de9fab731e27a761c01302a0a93e2d1070 (diff) | |
download | numpy-cf46d8cd2aa809be44b684ba234880e0aa4befe9.tar.gz |
TST: Update modules `test` to PytestTester.
Numpy can now be tested using the standard
`python -c"import numpy; numpy.test()"`
construct.
Diffstat (limited to 'numpy/__init__.py')
-rw-r--r-- | numpy/__init__.py | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/numpy/__init__.py b/numpy/__init__.py index db7bc0368..d10a1ecd3 100644 --- a/numpy/__init__.py +++ b/numpy/__init__.py @@ -146,11 +146,6 @@ else: pkgload.__doc__ = PackageLoader.__call__.__doc__ - # We don't actually use this ourselves anymore, but I'm not 100% sure that - # no-one else in the world is using it (though I hope not) - from .testing import Tester, _numpy_tester - test = _numpy_tester().test - # Allow distributors to run custom init code from . import _distributor_init @@ -186,13 +181,16 @@ else: __all__.extend(lib.__all__) __all__.extend(['linalg', 'fft', 'random', 'ctypeslib', 'ma']) - - # Filter annoying Cython warnings that serve no good purpose. - warnings.filterwarnings("ignore", message="numpy.dtype size changed") - warnings.filterwarnings("ignore", message="numpy.ufunc size changed") - warnings.filterwarnings("ignore", message="numpy.ndarray size changed") - # oldnumeric and numarray were removed in 1.9. In case some packages import # but do not use them, we define them here for backward compatibility. oldnumeric = 'removed' numarray = 'removed' + + # We don't actually use this ourselves anymore, but I'm not 100% sure that + # no-one else in the world is using it (though I hope not) + from .testing import Tester + + # Pytest testing + from numpy.testing._private.pytesttester import PytestTester + test = PytestTester(__name__) + del PytestTester |