February 2022
Intermediate to advanced
274 pages
6h 28m
English
In Chapter 11, tox and Continuous Integration, we used tox to test Cards against multiple versions of Python. We’re going to do the same thing with our plugin, but also test against a couple versions of pytest.
Here’s our tox.ini for our plugin:
| | [pytest] |
| | testpaths = tests |
| | |
| | [tox] |
| | envlist = py{37, 38, 39, 310}-pytest{62,70} |
| | isolated_build = True |
| | |
| | [testenv] |
| | deps = |
| | pytest62: pytest==6.2.5 |
| | pytest70: pytest==7.0.0 |
| | |
| | commands = pytest {posargs:tests} |
| | description = Run pytest |
We are using a couple of new tricks for tox:
envlist = py{37, 38, 39, 310}-pytest{62,70}. The curly brackets and dashes are creating a test environment ...
Read now
Unlock full access