Skip to content

Pytest shows unknown marker warning for integration tests #399

@SaitejaKommi

Description

@SaitejaKommi

Description

Running pytest emits PytestUnknownMarkWarning because tests use the marker @pytest.mark.integration, but the marker is not registered in the pytest configuration.

This results in noisy output during local development and CI runs.

Expected Behavior

  • The integration marker should be registered in the pytest configuration.
  • pytest should recognize @pytest.mark.integration without emitting warnings.

Actual Behavior

  • pytest raises PytestUnknownMarkWarning for tests using @pytest.mark.integration.

Motivation

Unregistered markers create unnecessary warning noise and may hide real warnings or errors in CI logs.

Suggested Fix

Register the marker in pyproject.toml under [tool.pytest.ini_options].

Example:

[tool.pytest.ini_options]
markers = [
    "integration: mark tests as integration tests"
]

Impact

  • Removes PytestUnknownMarkWarning
  • Cleaner CI and local test output
  • Better clarity when real warnings occur

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