Skip to content

Commit

Permalink
test: combine the asserts for output and errors
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jnikula committed Sep 12, 2024
1 parent 0a196b2 commit 67c4ee3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/testenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 67c4ee3

Please sign in to comment.