jerry-git / jerry-git/pytest-split

Tests are incorrectly split when there are a lot of slow skipped tests

Offen
#78 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
325
Forks
56
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I'm running `pytest-split` on a test suite that has a lot of slow tests which are `pytest.mark`ed as slow and skipped by default. I can include all these tests by using a custom `pytest --all-tests` option.
The issue I'm seeing now is that when I create a `.test_durations` file via `pytest --all-tests --store-durations` then the regular `pytest --splits 4 ...` run without the `--all-tests` will be unbalanced. It seems as though `pytest-split` is taking into account the runtime of the skipped tests and thus failing to produce a balanced split. A workaround is to store one `.tests_durations` file for `pytest --all-tests` and a separate file for the plain `pytest`, but I think ideally this should not be required.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Reproduce the imbalance with pytest --all-tests --store-durations followed by a regular pytest --splits 4 run, then trace how stored durations for skipped tests are loaded and used for splitting. Done means the regular run produces balanced splits without requiring a separate duration file, with coverage for suites containing slow tests skipped by default.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
testing-qa
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
48/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.