| 1 | # tox (https://tox.readthedocs.io/) is a tool for running tests |
| 2 | # in multiple virtualenvs. This configuration file will run the |
| 3 | # test suite on all supported python versions. To use it, "pip install tox" |
| 4 | # and then run "tox" from this directory. |
| 5 | |
| 6 | [tox] |
| 7 | minversion = 4.0 |
| 8 | envlist = |
| 9 | flake8 |
| 10 | mypy-{current,lowest} |
| 11 | py{313,312,311,310,39,38} |
| 12 | skip_missing_interpreters = True |
| 13 | usedevelop = False |
| 14 | download = False |
| 15 | |
| 16 | [testenv] |
| 17 | # settings in this category apply to all other testenv, if not overwritten |
| 18 | skip_install = True |
| 19 | allowlist_externals = poetry |
| 20 | commands_pre = |
| 21 | {envpython} --version |
| 22 | poetry install -v |
| 23 | poetry run pip freeze |
| 24 | commands = |
| 25 | poetry run coverage run --source=requirements -m unittest discover -s tests -v |
| 26 | |
| 27 | [testenv:mypy{,-current,-lowest}] |
| 28 | commands = |
| 29 | # mypy config is in own file: `.mypy.ini` |
| 30 | !lowest: poetry run mypy |
| 31 | lowest: poetry run mypy --python-version=3.8 |
| 32 | |
| 33 | [testenv:flake8] |
| 34 | commands = |
| 35 | # mypy config is in own file: `.flake8` |
| 36 | poetry run flake8 requirements/ tests/ |