Skip to content

pytest.skip option to allow to work at module level #2805

@nicoddemus

Description

@nicoddemus

As discussed in #2338

@The-Compiler wrote


The Skipped exception already has allow_module_level=True as argument which is used by pytest.importorskip internally - so you should already be able to do raise pytest.skip.Exception("...", allow_module_level=True).

I think we should just expose that via pytest.skip(...) too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueeasy issue that is friendly to new contributortopic: selectionrelated to test selection from the command linetype: enhancementnew feature or API change, should be merged into features branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions