Skip to content

Commit

Permalink
Add note about when to update test durations
Browse files Browse the repository at this point in the history
  • Loading branch information
AnesBenmerzoug committed Oct 29, 2023
1 parent 88a0319 commit 549c3dc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,16 @@ runs](#skipping-ci-runs)).
For that we use [pytest-split](https://jerry-git.github.io/pytest-split)
to first store the duration of all tests with `pytest --store-durations pytest --slow-tests`
in a `.test_durations` file.

> **Note** This does not have to be done each time a new test or test case
> is added. For new tests and test cases pytes-split assumes
> average test execution time(calculated based on the stored information)
> for every test which does not have duration information stored.
> Thus, there's no need to store durations after changing the test suite.
> However, when there are major changes in the suite compared
> to what's stored in .test_durations, it's recommended to update
> the duration information with `--store-durations` to ensure
> that the splitting is in balance.
Then we can have as many splits as we want:

Expand Down

0 comments on commit 549c3dc

Please sign in to comment.