mirror of
https://github.com/dgelessus/python-rsrcfork.git
synced 2024-11-25 19:31:44 +00:00
Fix test_textclipping not checking resource ID lists properly
Because Python's zip terminates once *any* of the input iterables terminates, the previous code would not detect if the file was missing resources or contained extra ones.
This commit is contained in:
parent
a7a407a1dd
commit
fbd861edf4
@ -52,6 +52,8 @@ class ResourceFileReadTests(unittest.TestCase):
|
||||
for (actual_type, actual_reses), (expected_type, expected_reses) in zip(rf.items(), TEXTCLIPPING_RESOURCES.items()):
|
||||
with self.subTest(type=expected_type):
|
||||
self.assertEqual(actual_type, expected_type)
|
||||
self.assertEqual(list(actual_reses), list(expected_reses))
|
||||
|
||||
for (actual_id, actual_res), (expected_id, expected_data) in zip(actual_reses.items(), expected_reses.items()):
|
||||
with self.subTest(id=expected_id):
|
||||
self.assertEqual(actual_res.type, expected_type)
|
||||
|
Loading…
Reference in New Issue
Block a user