diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2016-08-28 13:37:28 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2016-08-28 13:37:28 -0600 |
commit | 1c218e97f14cf47672cb212e6645002940463ca8 (patch) | |
tree | dccd918a6395e078e4a84deb27515bbd0754de12 /numpy | |
parent | 3c34457ac9e6c11f9197f513013d8ab1ee9d9236 (diff) | |
download | numpy-1c218e97f14cf47672cb212e6645002940463ca8.tar.gz |
STY: Small PEP8 cleanups.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/testing/nosetester.py | 2 | ||||
-rw-r--r-- | numpy/testing/tests/test_utils.py | 4 | ||||
-rw-r--r-- | numpy/testing/utils.py | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/numpy/testing/nosetester.py b/numpy/testing/nosetester.py index 68165e126..6fff240eb 100644 --- a/numpy/testing/nosetester.py +++ b/numpy/testing/nosetester.py @@ -55,6 +55,7 @@ def get_package_name(filepath): return '.'.join(pkg_name) + def run_module_suite(file_to_run=None, argv=None): """ Run a test module. @@ -489,6 +490,7 @@ class NoseTester(object): return nose.run(argv=argv, addplugins=add_plugins) + def _numpy_tester(): if hasattr(np, "__version__") and ".dev0" in np.__version__: mode = "develop" diff --git a/numpy/testing/tests/test_utils.py b/numpy/testing/tests/test_utils.py index 6ba0b5a75..c0f609883 100644 --- a/numpy/testing/tests/test_utils.py +++ b/numpy/testing/tests/test_utils.py @@ -779,6 +779,7 @@ class TestULP(unittest.TestCase): lambda: assert_array_max_ulp(nan, nzero, maxulp=maxulp)) + class TestStringEqual(unittest.TestCase): def test_simple(self): assert_string_equal("hello", "hello") @@ -804,7 +805,7 @@ def assert_warn_len_equal(mod, n_in_context, py3_n_in_context=None): if 'version' in mod_warns: if py3_n_in_context is None: py3_n_in_context = n_in_context - assert_equal(len(mod_warns)-1, py3_n_in_context) + assert_equal(len(mod_warns) - 1, py3_n_in_context) else: assert_equal(len(mod_warns), n_in_context) @@ -1038,7 +1039,6 @@ def test_tempdir(): assert_(not os.path.isdir(tdir)) - def test_temppath(): with temppath() as fpath: with open(fpath, 'w') as f: diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py index 20f7a9ac2..c7f4a0aa7 100644 --- a/numpy/testing/utils.py +++ b/numpy/testing/utils.py @@ -48,6 +48,7 @@ verbose = 0 IS_PYPY = '__pypy__' in sys.modules HAS_REFCOUNT = getattr(sys, 'getrefcount', None) is not None + def import_nose(): """ Import nose only when needed. """ |