log more information from pytest assertions in system tests
Some python system tests contain assert
expression like
assert loaded == expected
which provide no useful information in case the check fails, e.g.:
_______________________ test_zone_timers_secondary_json ________________________
[gw1] linux -- Python 3.11.6 /usr/bin/python3
/builds/isc-private/bind9/bin/tests/system/statschannel/tests_json.py:86: in test_zone_timers_secondary_json
generic.test_zone_timers_secondary(
/builds/isc-private/bind9/bin/tests/system/statschannel/generic.py:94: in test_zone_timers_secondary
check_zone_timers(loaded, expires, refresh, mtime)
/builds/isc-private/bind9/bin/tests/system/statschannel/generic.py:49: in check_zone_timers
check_loaded(loaded, loaded_exp, now)
/builds/isc-private/bind9/bin/tests/system/statschannel/generic.py:38: in check_loaded
assert loaded == expected
E AssertionError
An informative assert message with the relevant values/data should be added to the assert statements:
assert loaded == expected, f"loaded={loaded}, expected={expected}"
Edited by Nicki Křížek