I would like to use tox
to run my unittests in two virtualenvs, since my application has to support 2 different Python versions.
My problem is that tox
requires a setup.py
, but I have none since my application is not a module and has its own installer. For now I don't want to go through the hassle of automating the install process as to work with setup.py
, I just want to run my unittests without having to write a setup.py
.
Is that possible? Or how can I write an "empty" setup.py that simply does nothing? Can you point me towards some documentation on the subject (the distutils
documentation explains how to write a meaningful setup.py
, not an empty one)?
tox directory after running the tox command. skipsdist which we need to set when we are not testing a Python package (e.g. for a service or simple set of scripts). Anytime tox doesn't find a setup.py file this flag will need to be set.
¶ tox is a generic virtualenv management and test command line tool you can use for: checking that your package installs correctly with different Python versions and interpreters.
After digging inside the source code, I found a scarcely documented option in tox.ini that skips sdist:
[tox] skipsdist = BOOL # defaults to false
Setting this to True
I got what I wanted, saving me the effort of writing a meaningful setup.py
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With