diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2015-07-04 22:47:52 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2015-07-04 23:51:48 -0600 |
commit | e79d6e306c675eee852a8ebaa26a137d4296841a (patch) | |
tree | a3985fe1efd680b46d30668c4418232c5dad0edc /numpy/lib | |
parent | 9bc2d3214a454e5341b27bf4a22bc8a241b86a83 (diff) | |
download | numpy-e79d6e306c675eee852a8ebaa26a137d4296841a.tar.gz |
BUG: Fix imports in test_io.py and test_recfunctions.py.
Those test functions were incorrectly importing test functions
from numpy/ma/testutils that were actually not defined there, but
rather in numpy/testing. That did not cause an error when testutils
was '*' importing all the test functions, but it was deceptive as
some of the functions might appear to support masked arrays when
they do not.
Diffstat (limited to 'numpy/lib')
-rw-r--r-- | numpy/lib/tests/test_io.py | 16 | ||||
-rw-r--r-- | numpy/lib/tests/test_recfunctions.py | 5 |
2 files changed, 11 insertions, 10 deletions
diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py index 8a939f85e..fbeb7fb0a 100644 --- a/numpy/lib/tests/test_io.py +++ b/numpy/lib/tests/test_io.py @@ -13,15 +13,17 @@ from datetime import datetime import numpy as np import numpy.ma as ma -from numpy.lib._iotools import (ConverterError, ConverterLockError, - ConversionWarning) +from numpy.lib._iotools import ( + ConverterError, ConverterLockError, ConversionWarning + ) from numpy.compat import asbytes, bytes, unicode from nose import SkipTest -from numpy.ma.testutils import ( - TestCase, assert_equal, assert_array_equal, assert_allclose, - assert_raises, assert_raises_regex, run_module_suite -) -from numpy.testing import assert_warns, assert_, build_err_msg +from numpy.ma.testutils import assert_equal, assert_almost_equal +from numpy.testing import ( + TestCase, run_module_suite, assert_warns, assert_, build_err_msg, + assert_raises_regex, assert_raises, assert_allclose, + assert_array_equal, + ) from numpy.testing.utils import tempdir diff --git a/numpy/lib/tests/test_recfunctions.py b/numpy/lib/tests/test_recfunctions.py index 13e75cbd0..09cc29dc1 100644 --- a/numpy/lib/tests/test_recfunctions.py +++ b/numpy/lib/tests/test_recfunctions.py @@ -3,9 +3,8 @@ from __future__ import division, absolute_import, print_function import numpy as np import numpy.ma as ma from numpy.ma.mrecords import MaskedRecords -from numpy.ma.testutils import ( - run_module_suite, TestCase, assert_, assert_equal - ) +from numpy.ma.testutils import assert_equal +from numpy.testing import TestCase, run_module_suite, assert_ from numpy.lib.recfunctions import ( drop_fields, rename_fields, get_fieldstructure, recursive_fill_fields, find_duplicates, merge_arrays, append_fields, stack_arrays, join_by |