mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Catch ValueError raised by pytest.config.getoption()
pytest.config.getoption() can raise ValueError for unknown options, too. Reviewed-By: Milan Kubik <mkubik@redhat.com>
This commit is contained in:
committed by
Martin Basti
parent
0ef55a91ef
commit
3387734e6c
@@ -140,8 +140,10 @@ class test_Fuzzy(object):
|
||||
|
||||
def test_assert_deepequal():
|
||||
f = util.assert_deepequal
|
||||
# pylint: disable=no-member
|
||||
pretty = pytest.config.getoption("pretty_print")
|
||||
try: # pylint: disable=no-member
|
||||
pretty = pytest.config.getoption("pretty_print")
|
||||
except (AttributeError, ValueError):
|
||||
pretty = False
|
||||
|
||||
# LEN and KEYS formats use special function to pretty print structures
|
||||
# depending on a pytest environment settings
|
||||
|
||||
Reference in New Issue
Block a user