Skip to content

Exit pytest cleanly "mid" run #3574

@BeyondEvil

Description

@BeyondEvil

I'm looking for certain conditions in the pytest_sessionstart() hook and I want to be able to stop/exit/abort further execution in a clean way.

Any idea how I can accomplish this? Neither pytest.exit() or sys.exit()/exit() does it cleanly.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: questiongeneral question, might be closed after 2 weeks of inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions