Skip to content

TOML config opts verbosity_assertions, verbosity_subtests, & verbosity_test_cases no longer accept numeric string values in 9.2.0 #15290

Closed

Description

@bashonly

As of version 9.2.0, the options verbosity_assertions, verbosity_subtests, & verbosity_test_cases no longer accept numeric string values in pyproject.toml configuration files.

Despite the changelog entry stating that they still accept numeric string values for backwards compatibility, they only accept integer values or 'auto'.

Activity

  1. Lpk124 commented on Oct 29, 2026

    @Lpk124

    I reproduced the 9.2.0 regression and opened #15294 with focused TOML numeric-string coverage for the three verbosity options. The compatibility path is limited to the built-in verbosity settings; generic plugin int | str and int | Literal[...] unions remain strict.

  2. bashonly commented on Oct 29, 2026

    @bashonly
    Author

    Edit: using tool.pytest.ini_options instead of tool.pytest in pyproject.toml is a viable workaround. Thanks @yardenac

  3. yardenac commented on Oct 29, 2026

    @yardenac

    3. This is a frustrating regression since my project's config only works with pytest<9.2.0 as-is, and if I adjust the config for latest pytest then it will only work with pytest>=9.2.0. I can't seem to find any workaround that will preserve my settings and satisfy both <9.2.0 and 9.2.0.

    it seems this was intentional:

    this ... removes a intentional tightening of the behavior

    this pr accepts the old way again, but with a deprecation warning. either way, the only workaround will be to check pytest's version first, or to require a certain version

    EDIT: ... or to use ini_options

  4. added a commit that references this issue on Nov 4, 2026
    6ed587d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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