pytest-randomly
pytest-randomly copied to clipboard
:game_die: Pytest plugin to randomly order tests and control random.seed
### Description The readme says: > If [numpy](http://www.numpy.org/) is installed, its global random state is reset at the start of every test. Nowadays, [numpy recommends](https://numpy.org/doc/1.25/reference/random/index.html) `numpy.random.default_rng`, which returns a PRNG...
### Description Hello, Using this plugin occasionally while writing new tests to prevent flakiness, but old tests still need to run without the random order. Currently accomplishing this via pytest.ini...
### Python Version 3.8.11 ### pytest Version 7.1.3 ### Package Version 3.12.0 ### Description For our package [alibi detect](https://github.com/SeldonIO/alibi-detect), we've defined a pytest-randomly entry point in our `setup.cfg`: ``` [options.entry_points]...
This PR is just an idea for restricting the use of random_seeder entry points (which might be) defined in 3rd party deps. It is **not complete** (no docs, tests etc)....
feature: each test starts with a unique seed. `--randomly-use-same-seed-per-test` for old behavior
Resolves #600 I'm tempted to make it the default behavior but this is safer.
### Description There is an older issue which sort of goes in this direction: https://github.com/pytest-dev/pytest-randomly/issues/75 which the final word being that this does not fall in the scope of this...
### Description Suggestion from chat with @graingert and @seporaitis: add a `--randomly-seed-vcs` or similar option that uses the current Git commit SHA as the seed. That way, parallel test runs...
### Python Version 3.9.18 ### pytest Version 8.3.3 ### Package Version 3.15.0 ### Description Since Faker v32.0.0 its `faker` fixture has been scoped to session which triggers this error in...
### Python Version 3.12 ### pytest Version 8.3.3 ### Package Version 3.15.0 ### Description Making a simple [pybind11](https://github.com/pybind/pybind11/) module that binds a function calling `ostringstream.str()` appears to break in pytest...