Skip to content

Test re-ordering breaks Pytest's --failed-first and --stepwise options #819

@callahad

Description

@callahad

The test re-ordering introduced in response to #214 seems to execute after pytest's own --failed-first, --new-first, --stepwise, etc. ordering options, breaking them.

We ran across this in mdn/kuma#6531, where even with --failed-first pytest was running dozens of known good tests before executing the failed tests.

Removing the pytest_collection_modifyitems function or decorating it with @pytest.hookimpl(tryfirst=True) seems to resolve this, though I'm not familiar enough with pytest to know if that's an appropriate solution, or if there's something we should be doing on our end instead.

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