Skip to content

Make --strict/--strict-markers/xfail_strict consistent #7233

@webknjaz

Description

@webknjaz

(It's a follow-up for https://twitter.com/codewithanthony/status/1263130307848335360)

While reading the doc about markers, I encountered mentions of --strict/--strict-markers CLI args and an example for adding them via addopts. It was not clear if they are the same or not so I added both. Since some options support being specified as both a config setting and a CLI option, I first tried setting them outside of addopts (it didn't work).
I then recalled that there's also xfail_strict and compared the behaviors. xfail_strict turns out to be a config-only thing while --stict/--strict-markers are CLI-only. Later I learned that --stict==--strict-markers.

It's not obvious why they exist in these specific forms but it seems like it'd be beneficial to adjust this inconsistency and maybe add a few more clarifications to the docs.

WDYT?

  • 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: docsdocumentation improvement, missing or needing clarification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions