Skip to content

Commit

Permalink
Merge pull request #216 from BerkeleyLearnVerify/tox
Browse files Browse the repository at this point in the history
Upgrade to Tox 4; document how to use it
  • Loading branch information
dfremont authored Feb 29, 2024
2 parents 5d81fb0 + a9931d4 commit 29de7c8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
15 changes: 15 additions & 0 deletions docs/developing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@ If you're running the test suite on a headless server or just want to stop windo
popping up during testing, use the :command:`--no-graphics` option to skip graphical
tests.

Prior to finalizing a PR or other substantial changes, it's a good idea to run the test suite under all major versions of Python that Scenic supports, in fresh virtual environments.
You can do this automatically with the command :command:`tox`, which by default will test all supported major versions both with and without optional dependencies (this will take a long time).
Some variations:

* :command:`tox -p` will run the various combinations in parallel.

* :command:`tox -m basic` skips testing installations with the optional dependencies.

* :command:`tox -- --fast` only runs the "fast" tests. In general, any arguments after the :command:`--` will get passed to ``pytest``. For example,

* :command:`tox -- tests/syntax/test_specifiers.py` only runs the tests in the given file.

See the `Tox <https://tox.wiki/>`_ website for more information about the available options and how to configure Tox.


.. _debugging:

Debugging
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ dev = [
"isort ~= 5.11",
"pre-commit ~= 3.0",
"pytest-cov >= 3.0.0",
"tox ~= 3.14",
"tox ~= 4.0",
]

[project.urls]
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[tox]
isolated_build = true
envlist = py{38,39,310,311,312}{,-extras}
labels =
basic = py{38,39,310,311,312}

[testenv]
extras =
Expand Down

0 comments on commit 29de7c8

Please sign in to comment.