diff options
Diffstat (limited to 'numpy/tests/test_public_api.py')
-rw-r--r-- | numpy/tests/test_public_api.py | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/numpy/tests/test_public_api.py b/numpy/tests/test_public_api.py index e3621c0fd..fb7ec5d83 100644 --- a/numpy/tests/test_public_api.py +++ b/numpy/tests/test_public_api.py @@ -1,5 +1,3 @@ -from __future__ import division, absolute_import, print_function - import sys import subprocess import pkgutil @@ -30,9 +28,6 @@ def check_dir(module, module_name=None): return results -@pytest.mark.skipif( - sys.version_info[0] < 3, - reason="NumPy exposes slightly different functions on Python 2") def test_numpy_namespace(): # None of these objects are publicly documented to be part of the main # NumPy namespace (some are useful though, others need to be cleaned up) @@ -50,7 +45,6 @@ def test_numpy_namespace(): 'fastCopyAndTranspose': 'numpy.core._multiarray_umath._fastCopyAndTranspose', 'get_array_wrap': 'numpy.lib.shape_base.get_array_wrap', 'get_include': 'numpy.lib.utils.get_include', - 'int_asbuffer': 'numpy.core._multiarray_umath.int_asbuffer', 'mafromtxt': 'numpy.lib.npyio.mafromtxt', 'ndfromtxt': 'numpy.lib.npyio.ndfromtxt', 'recfromcsv': 'numpy.lib.npyio.recfromcsv', @@ -100,6 +94,12 @@ def test_import_lazy_import(name): assert name in dir(np) +def test_dir_testing(): + """Assert that output of dir has only one "testing/tester" + attribute without duplicate""" + assert len(dir(np)) == len(set(dir(np))) + + def test_numpy_linalg(): bad_results = check_dir(np.linalg) assert bad_results == {} @@ -228,7 +228,6 @@ PRIVATE_BUT_PRESENT_MODULES = ['numpy.' + s for s in [ "distutils.command.install_data", "distutils.command.install_headers", "distutils.command.sdist", - "distutils.compat", "distutils.conv_template", "distutils.core", "distutils.extension", @@ -298,15 +297,8 @@ PRIVATE_BUT_PRESENT_MODULES = ['numpy.' + s for s in [ "ma.timer_comparison", "matrixlib", "matrixlib.defmatrix", - "random.bit_generator", - "random.bounded_integers", - "random.common", - "random.generator", - "random.mt19937", "random.mtrand", - "random.pcg64", - "random.philox", - "random.sfc64", + "random.bit_generator", "testing.print_coercion_tables", "testing.utils", ]] @@ -394,7 +386,7 @@ SKIP_LIST_2 = [ 'numpy.matlib.fft', 'numpy.matlib.random', 'numpy.matlib.ctypeslib', - 'numpy.matlib.ma' + 'numpy.matlib.ma', ] |