Skip to content

pytest-timeout SIGALRM crashes entire suite on Windows #39880

@rodboev

Description

@rodboev

pyproject.toml sets --timeout-method=signal in pytest addopts, which uses SIGALRM. Windows has no SIGALRM, so the suite crashes with INTERNALERROR before completing.

Switching to --timeout-method=thread fixes it. The thread method works cross-platform and is the pytest-timeout default. On this repo, scripts/run_tests_parallel.py still provides the outer per-file process timeout backstop, so the suite keeps its process-level hang protection while local Windows pytest runs can execute.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existstype/bugSomething isn't workingtype/testTest coverage or test infrastructure

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions