Skip to content

Tests not parallelized efficienctly by pytest #5755

@JukkaL

Description

@JukkaL

When I run pytest mypy, towards the end of a test run only 1 or 2 python processes are running and test progress is very slow -- each process is using much less than 100% of a CPU. This happens even though I requested 8 parallel processes. Initially I see 8 processes doing work, but something causes a slowdown towards the end of a test run.

This doesn't look like a recent regression, but I think that things have gotten worse in the last few months or so.

Some data (Linux, Intel 4-core/8-thread CPU):

  • When I check out e378601 from May 2018, tests finish in 66s (6024 tests).
  • When I check out 1606f0f from Oct 2018, tests finish in 133s (6671 tests).

This seems to happen both on Linux and macOS.

Updating to the latest pytest doesn't help.

It would be great if somebody could try to reproduce the issue.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions