Skip to content

Commit eb5c3de

Browse files
committed
Fixup test_parameter.py
1 parent 2679e47 commit eb5c3de

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_parameter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ def test_byte_parameter(self):
4747
ByteArrayParameter([0, '1'])
4848
with self.assertRaises(TypeError):
4949
ByteArrayParameter([bytes([0, 1, 2, 3]), bytes([4, 5, 6, 7])])
50+
with self.assertRaises(OverflowError):
51+
ByteArrayParameter(ndarray(shape=[16], dtype=int8, buffer=array(int_data, dtype=int8)))
5052
with self.assertRaises(TypeError):
51-
ByteArrayParameter(ndarray(shape=[16], dtype=int8, buffer=array([int8(val) for val in int_data])))
52-
with self.assertRaises(TypeError):
53-
ByteArrayParameter(ndarray(shape=[16], dtype=uint16, buffer=array([uint16(val) for val in int_data])))
53+
ByteArrayParameter(ndarray(shape=[16], dtype=uint16, buffer=array(int_data, dtype=uint16)))
5454
with self.assertRaises(ValueError):
5555
ByteArrayParameter([])
5656
with self.assertRaises(ValueError):

0 commit comments

Comments
 (0)