FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Error 'bool' object has no attribute 'origin' Config._getini · Issue #13946 · pytest-dev/pytest · GitHub

Error 'bool' object has no attribute 'origin' Config._getini #13946

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"] = True

Exception 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

No one assigned

    Labels

    topic: configrelated to config handling, argument parsing and config filetype: deprecationfeature that will be removed in the future

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL