Skip to content

Need a programmatic way to register markers #5255

@charris

Description

@charris

The latest (4.5.0) pytest release raises a warning when non-registered markers are discovered in the discovery phase. That can be fixed by registering the markers in the pytest.ini file as long as that file is present and findable, however, that is not the case when testing NumPy installed from wheels or using setup.py, as the tests are run from the imported NumPy module. What would be helpful is if there were a way to register the marks from the pytest command line or possibly during the discovery phase. There may already be such a method, but I am unable to find it in the documentation.

  • a detailed description of the bug or suggestion
  • 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

    type: questiongeneral question, might be closed after 2 weeks of inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions