summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Stagg <ste@sta.gg>2019-07-07 12:56:30 +0100
committerSteve Stagg <ste@sta.gg>2019-07-07 13:01:46 +0100
commitf723325b6f36868dfa483ff777e0447c229ffc42 (patch)
tree6d1363239075a1f587f18f8482ac8d00b9147711
parent839b3e471ed56b17bb728d70ec90f332c696c87b (diff)
downloadnumpy-f723325b6f36868dfa483ff777e0447c229ffc42.tar.gz
STY: standardize creation of bytestrings in dtype tests
Use the b'' constructor rather than bytes([])
-rw-r--r--numpy/core/tests/test_dtype.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/tests/test_dtype.py b/numpy/core/tests/test_dtype.py
index e7b93396c..f60eab696 100644
--- a/numpy/core/tests/test_dtype.py
+++ b/numpy/core/tests/test_dtype.py
@@ -115,7 +115,7 @@ class TestBuiltin(object):
assert_dtype_equal(np.dtype(b'f'), np.dtype('float32'))
# Bytes with non-ascii values raise errors
- assert_raises(TypeError, np.dtype, bytes([255]))
+ assert_raises(TypeError, np.dtype, b'\xff')
assert_raises(TypeError, np.dtype, b's\xff')
def test_bad_param(self):