diff options
-rw-r--r-- | numpy/distutils/__init__.py | 4 | ||||
-rw-r--r-- | numpy/testing/__init__.py | 11 | ||||
-rw-r--r-- | numpy/testing/_private/__init__.py (renamed from numpy/testing/nose_tools/__init__.py) | 0 | ||||
-rw-r--r-- | numpy/testing/_private/decorators.py (renamed from numpy/testing/nose_tools/decorators.py) | 0 | ||||
-rw-r--r-- | numpy/testing/_private/noseclasses.py (renamed from numpy/testing/nose_tools/noseclasses.py) | 0 | ||||
-rw-r--r-- | numpy/testing/_private/nosetester.py (renamed from numpy/testing/nose_tools/nosetester.py) | 0 | ||||
-rw-r--r-- | numpy/testing/_private/parameterized.py (renamed from numpy/testing/nose_tools/parameterized.py) | 0 | ||||
-rw-r--r-- | numpy/testing/_private/utils.py (renamed from numpy/testing/nose_tools/utils.py) | 0 | ||||
-rw-r--r-- | numpy/testing/decorators.py | 7 | ||||
-rw-r--r-- | numpy/testing/noseclasses.py | 8 | ||||
-rw-r--r-- | numpy/testing/nosetester.py | 6 | ||||
-rwxr-xr-x | numpy/testing/setup.py | 2 | ||||
-rw-r--r-- | numpy/testing/utils.py | 7 |
13 files changed, 32 insertions, 13 deletions
diff --git a/numpy/distutils/__init__.py b/numpy/distutils/__init__.py index 0450334ff..d5921b399 100644 --- a/numpy/distutils/__init__.py +++ b/numpy/distutils/__init__.py @@ -17,7 +17,7 @@ try: # Normally numpy is installed if the above import works, but an interrupted # in-place build could also have left a __config__.py. In that case the # next import may still fail, so keep it inside the try block. - from numpy.testing.nosetester import _numpy_tester + from numpy.testing import _numpy_tester test = _numpy_tester().test except ImportError: pass @@ -26,7 +26,7 @@ except ImportError: def customized_fcompiler(plat=None, compiler=None): from numpy.distutils.fcompiler import new_fcompiler c = new_fcompiler(plat=plat, compiler=compiler) - c.customize() + c.customize() return c def customized_ccompiler(plat=None, compiler=None): diff --git a/numpy/testing/__init__.py b/numpy/testing/__init__.py index 9485b455e..f4970b06b 100644 --- a/numpy/testing/__init__.py +++ b/numpy/testing/__init__.py @@ -9,7 +9,12 @@ from __future__ import division, absolute_import, print_function from unittest import TestCase -from . import decorators as dec -from .nosetester import run_module_suite, NoseTester as Tester, _numpy_tester -from .utils import * +from ._private.utils import * +from ._private import decorators as dec +from ._private.nosetester import ( + run_module_suite, NoseTester as Tester, _numpy_tester, + ) + +__all__ = _private.utils.__all__ + ['TestCase', 'run_module_suite'] + test = _numpy_tester().test diff --git a/numpy/testing/nose_tools/__init__.py b/numpy/testing/_private/__init__.py index e69de29bb..e69de29bb 100644 --- a/numpy/testing/nose_tools/__init__.py +++ b/numpy/testing/_private/__init__.py diff --git a/numpy/testing/nose_tools/decorators.py b/numpy/testing/_private/decorators.py index dee832404..dee832404 100644 --- a/numpy/testing/nose_tools/decorators.py +++ b/numpy/testing/_private/decorators.py diff --git a/numpy/testing/nose_tools/noseclasses.py b/numpy/testing/_private/noseclasses.py index 08dec0ca9..08dec0ca9 100644 --- a/numpy/testing/nose_tools/noseclasses.py +++ b/numpy/testing/_private/noseclasses.py diff --git a/numpy/testing/nose_tools/nosetester.py b/numpy/testing/_private/nosetester.py index c2cf58377..c2cf58377 100644 --- a/numpy/testing/nose_tools/nosetester.py +++ b/numpy/testing/_private/nosetester.py diff --git a/numpy/testing/nose_tools/parameterized.py b/numpy/testing/_private/parameterized.py index 53e67517d..53e67517d 100644 --- a/numpy/testing/nose_tools/parameterized.py +++ b/numpy/testing/_private/parameterized.py diff --git a/numpy/testing/nose_tools/utils.py b/numpy/testing/_private/utils.py index 507ecb1e2..507ecb1e2 100644 --- a/numpy/testing/nose_tools/utils.py +++ b/numpy/testing/_private/utils.py diff --git a/numpy/testing/decorators.py b/numpy/testing/decorators.py index 21bcdd798..8f6eb3ce8 100644 --- a/numpy/testing/decorators.py +++ b/numpy/testing/decorators.py @@ -3,6 +3,9 @@ Back compatibility decorators module. It will import the appropriate set of tools """ -import os +import warnings -from .nose_tools.decorators import * +warnings.warn(ImportWarning, + "Import from numpy.testing, not numpy.testing.decorators") + +from ._private.decorators import * diff --git a/numpy/testing/noseclasses.py b/numpy/testing/noseclasses.py index 144c4e7e4..9431fc6f1 100644 --- a/numpy/testing/noseclasses.py +++ b/numpy/testing/noseclasses.py @@ -2,4 +2,10 @@ Back compatibility noseclasses module. It will import the appropriate set of tools """ -from .nose_tools.noseclasses import *
\ No newline at end of file +import warnings + +warnings.warn(ImportWarning, + "Import from numpy.testing, not numpy.testing.noseclasses") + +from ._private.noseclasses import * + diff --git a/numpy/testing/nosetester.py b/numpy/testing/nosetester.py index 949fae03e..74d159946 100644 --- a/numpy/testing/nosetester.py +++ b/numpy/testing/nosetester.py @@ -3,10 +3,12 @@ Back compatibility nosetester module. It will import the appropriate set of tools """ -import os +import warnings -from .nose_tools.nosetester import * +warnings.warn(ImportWarning, + "Import from numpy.testing, not numpy.testing.nosetester") +from ._private.nosetester import * __all__ = ['get_package_name', 'run_module_suite', 'NoseTester', '_numpy_tester', 'get_package_name', 'import_nose', diff --git a/numpy/testing/setup.py b/numpy/testing/setup.py index 5a0f977d9..b00e5e029 100755 --- a/numpy/testing/setup.py +++ b/numpy/testing/setup.py @@ -6,7 +6,7 @@ def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('testing', parent_package, top_path) - config.add_subpackage('nose_tools') + config.add_subpackage('_private') config.add_subpackage('pytest_tools') config.add_data_dir('tests') return config diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py index a0218c4e6..299c68c6a 100644 --- a/numpy/testing/utils.py +++ b/numpy/testing/utils.py @@ -3,9 +3,12 @@ Back compatibility utils module. It will import the appropriate set of tools """ -import os +import warnings -from .nose_tools.utils import * +warnings.warn(ImportWarning, + "Import from numpy.testing, not numpy.testing.utils") + +from ._private.utils import * __all__ = [ 'assert_equal', 'assert_almost_equal', 'assert_approx_equal', |