From 0d533bfb968cdf2ea355ff06f93b30e87347275c Mon Sep 17 00:00:00 2001 From: Ruben Verweij Date: Tue, 15 Oct 2019 09:47:56 +0200 Subject: [PATCH] Make unit test less specific to accomodate for different versions of struct --- tests/test_reader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_reader.py b/tests/test_reader.py index 27980b9..f37f738 100644 --- a/tests/test_reader.py +++ b/tests/test_reader.py @@ -53,7 +53,7 @@ class TestReader(unittest.TestCase): with self.assertRaises(struct.error) as exception: 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): # Best test we can do for now: @@ -64,5 +64,5 @@ class TestReader(unittest.TestCase): with self.assertRaises(struct.error) as exception: 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))