Browse Source

Make unit test less specific to accomodate for different versions of struct

zolfa-add_slices_loading
Ruben Verweij 5 years ago
parent
commit
0d533bfb96
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      tests/test_reader.py

+ 2
- 2
tests/test_reader.py View File

@ -53,7 +53,7 @@ class TestReader(unittest.TestCase):
with self.assertRaises(struct.error) as exception: with self.assertRaises(struct.error) as exception:
frame = reader.get_frame_2D(c=0, t=0, z=0, x=0, y=0, v=0) frame = reader.get_frame_2D(c=0, t=0, z=0, x=0, y=0, v=0)
self.assertEqual(str(exception.exception), "unpack requires a buffer of 8 bytes")
self.assertIn('unpack', str(exception.exception))
def test_get_frame_vczyx(self): def test_get_frame_vczyx(self):
# Best test we can do for now: # Best test we can do for now:
@ -64,5 +64,5 @@ class TestReader(unittest.TestCase):
with self.assertRaises(struct.error) as exception: with self.assertRaises(struct.error) as exception:
frame = reader.get_frame_vczyx(c=0, t=0, z=0, x=0, y=0, v=0) frame = reader.get_frame_vczyx(c=0, t=0, z=0, x=0, y=0, v=0)
self.assertEqual(str(exception.exception), "unpack requires a buffer of 8 bytes")
self.assertIn('unpack', str(exception.exception))

Loading…
Cancel
Save