Implement pytest-randomly in CI and Development workflows #485
Labels
cleanup
General code cleanup and optimization
documentation
Improvements or additions to documentation
future
Feature requests we will not address now, but at some point in the future.
tests
Fixes/improvements to tests
While looking to improve unit tests, I checked out a plugin (thanks to the @talkpython podcast for recommending it) called pytest-randomly. This plugin to pytest randomizes the tests in a test suite, so we can be sure that the unit tests are not order-dependent. Once installed, pytest can automatically pick it up and will randomize the tests that pytest selects.
It turns out that we DO have about 15% of our unit tests that fail if called out of order:
Without
pytest-randomly
:After
pytest-randomly
installed:This proposal is three parts:
pytest-randomly
installed on a dev machine, unit tests run withpython3 -m pytest -m unit
.The text was updated successfully, but these errors were encountered: