From 67c4ee3d832e568c24de2c4dc8d9992698143950 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Wed, 11 Sep 2024 23:33:03 +0300 Subject: [PATCH] test: combine the asserts for output and errors With the output and error asserts separate, the test case ends on the first failing assertion, and we never know what was in errors. But the clue to the output mismatch might be in the errors. For example, an include file was not found. By combining the asserts into one, we get all the differences in the pytest results. --- test/testenv.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/testenv.py b/test/testenv.py index dab0135b..4cadef11 100644 --- a/test/testenv.py +++ b/test/testenv.py @@ -104,8 +104,7 @@ def run_test(self): assert output_docs, 'empty output' assert expect_docs, 'empty expected' - assert output_docs == expect_docs - assert output_errors == expect_errors + assert output_docs + output_errors == expect_docs + expect_errors def get_testid(testcase): return testcase.get_testid()