From 548be0d26ff83f038f2f3b8ff39e6cf1520adcf8 Mon Sep 17 00:00:00 2001 From: Philipp Wendler Date: Fri, 7 Jun 2024 15:19:39 +0200 Subject: [PATCH] Make test more strict Due to how zip() works it would not have noticed if the expected result differed only by having more list elements. --- benchexec/test_integration/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/benchexec/test_integration/__init__.py b/benchexec/test_integration/__init__.py index f38847580..64356cc8c 100644 --- a/benchexec/test_integration/__init__.py +++ b/benchexec/test_integration/__init__.py @@ -202,6 +202,10 @@ def assertSameRunResults(self, actual_result_xml, other_result_xml): ) actual_runs = actual_result.findall("run") expected_runs = expected_result.findall("run") + self.assertListEqual( + [run.get("name") for run in actual_runs], + [run.get("name") for run in expected_runs], + ) for actual, expected in zip(actual_runs, expected_runs): self.assertEqual(actual.get("files"), expected.get("files")) self.assertEqual(actual.get("name"), expected.get("name"))