- Drop Python 3.8 support.
- Support Python 3.13.
- Support Python 3.12.
- Reset the random state for Model Bakery.
- Drop Python 3.7 support.
- Support Python 3.11.
- Drop Python 3.6 support.
Work on FIPS Python 3.9+, by declaring use of
hashlib.md5()
as not used for security.Thanks to dantebben for the report in Issue #414.
Fix crash when pytest’s cacheprovider is disabled.
Thanks to Mandeep Sandhu for the report in Issue #408.
Improve group name in
pytest --help
.
Fix new shuffling to work when one or more test in a class or module have the same test id.
Thanks to Nikita Sobolev for the report in Issue #378.
Rework shuffling algorithm to use hashing. This means that running a subset of tests with the same seed will now produce the same ordering as running the full set of tests. This allows narrowing down ordering-related failures.
Thanks to Tom Grainger for the suggestion in Issue #210.
Shuffle before other test collection hooks. This allows pytest’s --stepwise flag to work, among other things.
Thanks to Tom Grainger for the suggestion to try with
--stepwise
. Fixes Issue #376.
- Add type hints.
- Support Python 3.10.
- Drop dependency on
backports.entry-points-selectable
by depending onimportlib-metadata
version 3.6.0+.
Fix deprecation warning from importlib-metadata 3.9.0+.
Thanks to Dominic Davis-Foster for report in Issue #333.
Stop distributing tests to reduce package size. Tests are not intended to be run outside of the tox setup in the repository. Repackagers can use GitHub's tarballs per tag.
Drop Python 3.5 support.
- Support Python 3.9.
- Move license from BSD to MIT License.
- Fix numpy error
ValueError: Seed must be between 0 and 2**32 - 1
when passed a seed outside of this range.
Provide a
faker_seed
fixture to set the seed for tests using faker's pytest fixtures (as per its docs).Thanks to Romain Létendart for the change in PR #261.
- Fix to work when pytest-xdist is not installed or active
(
PluginValidationError: unknown hook 'pytest_configure_node'
).
- Add pytest-xdist support.
Previously it only worked reliably when setting
--randomly-seed
explicitly. When not provided, the default seed generated in workers could differ and collection would fail. Now when it is not provided, all xdist worker processes shared the same default seed generated in the main process.
- Update
MANIFEST.in
so tests are included in the sdist tarball again.
- Converted setuptools metadata to configuration file. This meant removing the
__version__
attribute from the package. If you want to inspect the installed version, useimportlib.metadata.version("pytest-randomly")
(docs / backport). - Convert reading entrypoints to use
importlib.metadata
. Depend onimportlib-metadata
on Python < 3.8. - Update Python support to 3.5-3.8.
- Add plugins via entry points
pytest_randomly.random_seeder
to allow outside packages to register additional random generators to seed. This has added a dependency on theentrypoints
package.
- Update Python support to 3.5-3.7, as 3.4 has reached its end of life.
- Handle
CollectError
s andImportError
s during collection when accessingitem.module
.
- Fix including tests in sdist after re-arrangement in 2.1.0.
- Add the option
--randomly-seed=last
to reuse the last used value for the seed.
- Drop Python 2 support, only Python 3.4+ is supported now.
- Fix
DeprecationWarning
with recent versions offactory_boy
.
- Fix collection to not sometimes crash when encoutering pytest
Item
s without a module.
- Fix collection to be deterministically shuffled again, regression in 1.2.0.
- Dropped Python 2.6 compatibility, as upstream dependency NumPy did.
- Reset and output the seed at the start of the test run when
--randomly-dont-reset-seed
is set, to allow the reorganization of tests to be reproducible.
- Reset the random state for NumPy too.
- Add Python 2.6 compatibility
- Offset the random seed during test setup and teardown. This is to avoid the awkward situation where test setup generates a random object, then the test generates a second one, but due to the re-seeding, they end up being always the same object. Thanks @rouge8 for the report.
- First release on PyPI.