-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
topic: configrelated to config handling, argument parsing and config filerelated to config handling, argument parsing and config filetype: deprecationfeature that will be removed in the futurefeature that will be removed in the future
Description
Hi,
The following bool setting causes an exception in pytest 9.0.0. Evidentially a bool has no attribute origin.
def pytest_configure(config):
config.inicfg["xfail_strict"] = TrueException thrown:
<somewhere>\_pytest\config\__init__.py:1666: in _getini
selected = max(candidates, key=lambda x: (x[0].origin == "override", x[1]))[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x = (True, True)
> selected = max(candidates, key=lambda x: (x[0].origin == "override", x[1]))[0]
^^^^^^^^^^^
E AttributeError: 'bool' object has no attribute 'origin'Metadata
Metadata
Assignees
Labels
topic: configrelated to config handling, argument parsing and config filerelated to config handling, argument parsing and config filetype: deprecationfeature that will be removed in the futurefeature that will be removed in the future