diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2017-03-25 10:31:40 +0000 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2017-03-25 10:36:30 +0000 |
commit | 0960eedb783fcdb2710bdcf832a807d9b28b17a3 (patch) | |
tree | 244b7b042ccaf351ba9fe90d9221286f1259d543 /numpy/lib/tests/test_format.py | |
parent | b87fca27261f79be20ab06a222ed2330d60d9f2c (diff) | |
download | numpy-0960eedb783fcdb2710bdcf832a807d9b28b17a3.tar.gz |
MAINT: Remove asbytes_nested where b prefixes would suffice
Diffstat (limited to 'numpy/lib/tests/test_format.py')
-rw-r--r-- | numpy/lib/tests/test_format.py | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/numpy/lib/tests/test_format.py b/numpy/lib/tests/test_format.py index 77ac5942a..2dcb260c3 100644 --- a/numpy/lib/tests/test_format.py +++ b/numpy/lib/tests/test_format.py @@ -284,7 +284,7 @@ import warnings from io import BytesIO import numpy as np -from numpy.compat import asbytes_nested, sixu +from numpy.compat import sixu from numpy.testing import ( run_module_suite, assert_, assert_array_equal, assert_raises, raises, dec, SkipTest @@ -682,23 +682,23 @@ def test_write_version(): raise AssertionError("we should have raised a ValueError for the bad version %r" % (version,)) -bad_version_magic = asbytes_nested([ - '\x93NUMPY\x01\x01', - '\x93NUMPY\x00\x00', - '\x93NUMPY\x00\x01', - '\x93NUMPY\x02\x00', - '\x93NUMPY\x02\x02', - '\x93NUMPY\xff\xff', -]) -malformed_magic = asbytes_nested([ - '\x92NUMPY\x01\x00', - '\x00NUMPY\x01\x00', - '\x93numpy\x01\x00', - '\x93MATLB\x01\x00', - '\x93NUMPY\x01', - '\x93NUMPY', - '', -]) +bad_version_magic = [ + b'\x93NUMPY\x01\x01', + b'\x93NUMPY\x00\x00', + b'\x93NUMPY\x00\x01', + b'\x93NUMPY\x02\x00', + b'\x93NUMPY\x02\x02', + b'\x93NUMPY\xff\xff', +] +malformed_magic = [ + b'\x92NUMPY\x01\x00', + b'\x00NUMPY\x01\x00', + b'\x93numpy\x01\x00', + b'\x93MATLB\x01\x00', + b'\x93NUMPY\x01', + b'\x93NUMPY', + b'', +] def test_read_magic(): s1 = BytesIO() |