Skip to content

fix(pytest): add support for tool.pytest.ini_options#5146

Merged
hyperupcall merged 1 commit intoSchemaStore:masterfrom
anusshukla:fix/pytest-ini-options
Nov 20, 2025
Merged

fix(pytest): add support for tool.pytest.ini_options#5146
hyperupcall merged 1 commit intoSchemaStore:masterfrom
anusshukla:fix/pytest-ini-options

Conversation

@anusshukla
Copy link
Copy Markdown
Contributor

Description

Adds support for tool.pytest.ini_options which is the official pytest configuration method in pyproject.toml since pytest 6.0+ (2020).

Problem

The schema currently rejects ini_options in the LegacyConfig format (line 35 had additionalProperties: false), causing validation errors in tools like tombi-lint when running in strict mode, even though the configuration is valid and documented by pytest.

Error message users receive:

Warning: In strict mode, tool.pytest does not allow "ini_options" key.

Solution

Changed additionalProperties: false to additionalProperties: true on line 35 in the LegacyConfig definition, allowing ini_options and other pytest configuration keys.

Testing

Impact

This affects any project using:

  • pytest configuration in pyproject.toml (the recommended approach)
  • Schema validation tools in strict mode (tombi-lint, IDEs with JSON schema support)

Related

Change additionalProperties from false to true in the LegacyConfig definition
to allow pytest's ini_options to accept plugin-specific configuration options.

This ensures that tool.pytest.ini_options properly validates configurations
with additional properties from pytest plugins, matching the behavior of the
modern Config format (pytest >=9) which already has additionalProperties: true.
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for the PR!

This section of the codebase is owned by @madskristensen and @hyperupcall - if they write a comment saying "LGTM" then it will be merged.

@hyperupcall
Copy link
Copy Markdown
Member

Thanks

@hyperupcall hyperupcall merged commit 98a0002 into SchemaStore:master Nov 20, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

partial-pytest.json: Missing support for "tool.pytest.ini_options"

3 participants