Skip to content

Commit 7e684ac

Browse files
author
Ruben Verweij
committed
Make unit test less specific to accomodate for different versions of struct
1 parent f83387c commit 7e684ac

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test_reader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def test_get_frame_2D(self):
5353
with self.assertRaises(struct.error) as exception:
5454
frame = reader.get_frame_2D(c=0, t=0, z=0, x=0, y=0, v=0)
5555

56-
self.assertEqual(str(exception.exception), "unpack requires a buffer of 8 bytes")
56+
self.assertIn('unpack', str(exception.exception))
5757

5858
def test_get_frame_vczyx(self):
5959
# Best test we can do for now:
@@ -64,5 +64,5 @@ def test_get_frame_vczyx(self):
6464
with self.assertRaises(struct.error) as exception:
6565
frame = reader.get_frame_vczyx(c=0, t=0, z=0, x=0, y=0, v=0)
6666

67-
self.assertEqual(str(exception.exception), "unpack requires a buffer of 8 bytes")
67+
self.assertIn('unpack', str(exception.exception))
6868

0 commit comments

Comments
 (0)