Commit 8d5ba63
authored
Stop using
This removes the `pytest-randomly` Pytest plugin, as it doesn't play
nice with `pytest-xdist`.
`pytest-randomly` (among other things) sets the random seed in the
beginning of the tests to the current datetime. `pytest-xdist` runs the
tests in parallel in multiple runners. When you use these two together,
it happens that all of the runners have the same random seed, so if you
e.g. [generate random resource
names](https://github.com/apify/apify-client-python/blob/13c029e82731138cf67912fe6b375ab61846d4c5/tests/integration/test_request_queue.py#L7-L12),
all runners will generate the same ones, leading to conflicts.
The other feature of `pytest-randomly`, running the tests in random
order to ensure that the tests are not passing just because of some side
effects caused by running in a specific order, does not work with
`pytest-xdist` at all, so there are zero benefits of using
`pytest-randomly` at all.pytest-randomly in tests (#112)1 parent 3acb8ba commit 8d5ba63
2 files changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
| |||
0 commit comments