diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2015-07-04 23:37:03 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2015-07-25 11:39:05 -0600 |
commit | b733a10a9cc806f4772728015ec1bd9e63322858 (patch) | |
tree | 8fc2664d6273176c5115df597fc347cdd043a88a /numpy/ma/testutils.py | |
parent | e79d6e306c675eee852a8ebaa26a137d4296841a (diff) | |
download | numpy-b733a10a9cc806f4772728015ec1bd9e63322858.tar.gz |
STY,MAINT: Run pyflakes and pep8 on numpy/ma/tests/*.
Also fix "*" imports.
The formatting of test arrays is not fixed for multiple spaces following
"," and other violations that are common in tests. To be precise, E241
and E201 are added to the errors that are excluded.
Diffstat (limited to 'numpy/ma/testutils.py')
-rw-r--r-- | numpy/ma/testutils.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/numpy/ma/testutils.py b/numpy/ma/testutils.py index 2af39d6b4..d1adc439e 100644 --- a/numpy/ma/testutils.py +++ b/numpy/ma/testutils.py @@ -16,7 +16,7 @@ from numpy.testing import assert_, build_err_msg import numpy.testing.utils as utils from .core import mask_or, getmask, masked_array, nomask, masked, filled -__all__ = [ +__all__masked = [ 'almost', 'approx', 'assert_almost_equal', 'assert_array_almost_equal', 'assert_array_approx_equal', 'assert_array_compare', 'assert_array_equal', 'assert_array_less', 'assert_close', @@ -24,6 +24,18 @@ __all__ = [ 'assert_not_equal', 'fail_if_array_equal', ] +# Include some normal test functions to avoid breaking other projects who +# have mistakenly included them from this file. SciPy is one. That was a +# bad idea, as some of these functions are not intended to work with masked +# arrays, but there was no way to tell before. +__all__from_testing = [ + 'TestCase', 'assert_', 'assert_allclose', + 'assert_array_almost_equal_nulp', 'assert_raises', 'run_modules_suite', + ] + +__all__ = __all__masked + + def approx(a, b, fill_value=True, rtol=1e-5, atol=1e-8): """ Returns true if all components of a and b are equal to given tolerances. |