tests: Report details about failed assertions in tests.base

This commit is contained in:
Tomas Janousek 2020-06-28 18:13:46 +02:00 committed by Tomas Babej
parent 1cb822455c
commit 3edeef5960
2 changed files with 9 additions and 1 deletions

View file

@ -114,7 +114,10 @@ class IntegrationTest(object):
# For silent commands, there should be no output
if silent is not None:
assert silent == bool(not result)
if silent:
assert not result
else:
assert result
# Multiline-evaluate the regex
if regex:

View file

@ -2,6 +2,11 @@
import pytest
import re
# enable assertion introspection for the common code in tests.base
pytest.register_assert_rewrite('tests.base')
markup_headers = {
'default': {
'HEADER1': "= %s =",