3 ms·
I think tox was designed to solve that problem. https://pypi.org/project/tox/ https://pypi.org/project/tox/
by maest 4y ago
I think tox was designed to solve that problem.
https://pypi.org/project/tox/ https://pypi.org/project/tox/
- Izkata 4y agoThis, absolutely. If you're running tests for building a package, here's an entire "tox.ini" file for running all your tests on multiple python versions: [tox] envlist = py27,py36,py38 [testenv] deps = pytest # Install extra packages for testing separate from what's in setup.py or whatever commands = pytest # Whatever test command your project uses That's really it for bare minimum. If you have pytest configuration, they can also go into tox.ini under a [pytest] section to keep them in the same place. Instead of installing tox globally you can even install it to a separate virtualenv, activate it, then run "tox". It figures out the right thing to do. If you're not building a package: [tox] envlist = py27,py36,py38 skipsdist = True # Don't attempt to build a package / pull from setup.py [testenv] deps = -r requirements.txt # Pull in project requirements pytest commands = pytest