1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
# Configuration for Python test environment manager
# https://tox.wiki/en/latest/user_guide.html
#
# Note that to run `test_nutclient.py` you must prepare a running NUT data
# server (upsd) with a connected driver. You can use a dummy-ups driver for
# that, see e.g. NUT tests/NIT/nit.sh for how the test beds are prepared.
# Further you may need to export `NUT_HOST` and `NUT_PORT` (if not default),
# and a `NUT_USER` and `NUT_PASS` for tests with logged-in session behaviors.
# Then just run `tox` (may have to `pip install tox` first though).
[tox]
envlist =
py2{6,7}
py3{5,5,6,7,8,9,10,11,12,13}
[testenv]
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/PyNUTClient
# On my system, some but not all Python versions complained about lack of
# "distutils.cmd" etc. in the prepared virtual environments. Can this help?
commands_pre =
python -m pip install -U pip
commands =
python PyNUTClient/test_nutclient.py
#py.test --basetemp={envtmpdir}
|