Skip to content

pytest 9.1.0: conftest.py addoption regressed in nested directories #14608

Description

@manupillai308

For a directory like below:

|- A
   |- conftest.py
|- B
   |- conftest.py (<== we have addoption here)

When we invoke the test from directory A, the CLI args added through addoption in B/conftest.py was loaded correctly.
The new version seems to fail here.
It throwspytest: error: unrecognized arguments: <args-list>

pytest: 9.1.0
OS: Ubuntu 24.04

  • a detailed description of the bug or problem you are having
  • output of pip list from the virtual environment you are using
  • pytest and operating system versions
  • minimal example if possible

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions