Skip to content

Add a slow marker #14834

Description

@WilliamJamieson

What's the problem this feature will solve?

I have seen the slow marker implemented as part of several different pytest-plugins such as pytest-skip-slow, ci-watson, and pytest-astropy.

It would be nice to have a common implementation of a slow marker, one which only runs tests with the --slow or --run-slow argument to pytest.

Describe the solution you'd like

See above.

While not ideal, it is often the case that we end up with useful tests that are "slow" and/or expensive to run. In a perfect world, we would improve those tests or simply run them anyways; however, reality often makes this difficult. So a marker that skips these tests by default, but allows you to run them if you want, such as when you have sufficient resources to accomodate the test, would be practically useful.

Alternative Solutions

I have had to work with several different implementations of this, see my links above. While they all work fine, they have the annoying issue of stepping on each other when multiple of these plugins is installed, causing pytest to fail when it is being started up. I also know that this marker is used as an example in the docs, so there isn't a lack of options.

My reasoning for asking for it as part of pytest itself, is it seems like a fairly common use case (at least for my work). While something like a a single common implementation exists like pytest-skip-slow, that requires one to find/use that plugin AND make sure there isn't some other implementation of it lurking in your pytest testing stack.

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