Skip to content

Commit

Permalink
Unit testing: randomize test execution order
Browse files Browse the repository at this point in the history
A recent commit 5b3f385 fixed an issue that was found in existing tests
as a result of adding a new test. This issue could have been caught
earlier by randomizing the execution order of the unit tests.

This commit adds pytest-randomly to the test requirements so that test
execution will be randomized.
  • Loading branch information
johningve committed Dec 14, 2023
1 parent 4a6c5e3 commit 246a262
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions continuous-integration/python-requirements/test.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pytest
pytest-helpers-namespace
pytest-randomly==3.12 # TODO: unfreeze when Python 3.7 support is dropped.
pytest-timeout
requests
13 changes: 7 additions & 6 deletions continuous-integration/python-requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile continuous-integration/python-requirements/test.in
# pip-compile --config=pyproject.toml continuous-integration/python-requirements/test.in
#
certifi==2023.5.7
# via requests
charset-normalizer==3.1.0
# via requests
exceptiongroup==1.1.1
colorama==0.4.6
# via pytest
idna==3.4
# via requests
Expand All @@ -22,14 +22,15 @@ pytest==7.3.1
# via
# -r continuous-integration/python-requirements/test.in
# pytest-helpers-namespace
# pytest-randomly
# pytest-timeout
pytest-helpers-namespace==2021.12.29
# via -r continuous-integration/python-requirements/test.in
pytest-randomly==3.12.0
# via -r continuous-integration/python-requirements/test.in
pytest-timeout==2.1.0
# via -r continuous-integration/python-requirements/test.in
requests==2.30.0
# via -r continuous-integration/python-requirements/test.in
tomli==2.0.1
# via pytest
urllib3==2.0.2
# via requests

0 comments on commit 246a262

Please sign in to comment.