diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2014-07-30 14:17:00 -0600 |
---|---|---|
committer | Julian Taylor <jtaylor.debian@googlemail.com> | 2014-07-31 21:07:59 +0200 |
commit | b2955ede452b8ca2aae5d0b035cd19c8a3b12480 (patch) | |
tree | 9650423c39ce77ba9831751094087d3c14687a5b /numpy/lib/tests/test_format.py | |
parent | 778af02eb7c1668e751f435cd2a4952a362a0433 (diff) | |
download | numpy-b2955ede452b8ca2aae5d0b035cd19c8a3b12480.tar.gz |
MAINT: Fix problems noted by pyflakes in numpy/lib/tests.
Diffstat (limited to 'numpy/lib/tests/test_format.py')
-rw-r--r-- | numpy/lib/tests/test_format.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/numpy/lib/tests/test_format.py b/numpy/lib/tests/test_format.py index 1034b5125..eea6f1e5c 100644 --- a/numpy/lib/tests/test_format.py +++ b/numpy/lib/tests/test_format.py @@ -284,9 +284,12 @@ import warnings from io import BytesIO import numpy as np -from numpy.testing import * -from numpy.lib import format from numpy.compat import asbytes, asbytes_nested +from numpy.testing import ( + run_module_suite, assert_, assert_array_equal, assert_raises, raises, + dec + ) +from numpy.lib import format tempdir = None @@ -445,7 +448,7 @@ def roundtrip_truncated(arr): return arr2 -def assert_equal(o1, o2): +def assert_equal_(o1, o2): assert_(o1 == o2) @@ -477,7 +480,7 @@ def test_long_str(): @dec.slow def test_memmap_roundtrip(): - # XXX: test crashes nose on windows. Fix this + # Fixme: test crashes nose on windows. if not (sys.platform == 'win32' or sys.platform == 'cygwin'): for arr in basic_arrays + record_arrays: if arr.dtype.hasobject: @@ -506,11 +509,10 @@ def test_memmap_roundtrip(): fp = open(mfn, 'rb') memmap_bytes = fp.read() fp.close() - yield assert_equal, normal_bytes, memmap_bytes + yield assert_equal_, normal_bytes, memmap_bytes # Check that reading the file using memmap works. ma = format.open_memmap(nfn, mode='r') - #yield assert_array_equal, ma, arr del ma |