mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
ipatests: Fix assert_deepequal outside of pytest process
https://fedorahosted.org/freeipa/ticket/6420 Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
parent
2df7098389
commit
e54109c167
@ -330,7 +330,12 @@ def assert_deepequal(expected, got, doc='', stack=tuple()):
|
||||
Note that lists and tuples are considered equivalent, and the order of
|
||||
their elements does not matter.
|
||||
"""
|
||||
if pytest.config.getoption("pretty_print"): # pylint: disable=no-member
|
||||
try:
|
||||
pretty_print = pytest.config.getoption("pretty_print") # pylint: disable=no-member
|
||||
except AttributeError:
|
||||
pretty_print = False
|
||||
|
||||
if pretty_print:
|
||||
expected_str = struct_to_string(expected, EXPECTED_LEN)
|
||||
got_str = struct_to_string(got, GOT_LEN)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user