wexpect-venv/tox.ini

29 lines
912 B
INI
Raw Normal View History

2019-09-04 09:51:09 +00:00
# tox.ini
2020-02-04 13:07:13 +00:00
# Run tests of wexpect in multiple configuration.
2019-09-04 09:51:09 +00:00
[tox]
2020-02-04 13:07:13 +00:00
# The following configuration will run automatically.
envlist = py{37}-{default,legacy_wexpect,spawn_pipe}
2019-09-04 09:51:09 +00:00
[testenv]
description = Unit tests
2020-02-04 13:07:13 +00:00
# Set environment variables to select the proper configuration for each envirnment.
setenv =
spawn_pipe: WEXPECT_SPAWN_CLASS=SpawnPipe
legacy_wexpect: WEXPECT_SPAWN_CLASS=legacy_wexpect
2020-02-04 13:07:13 +00:00
2019-09-04 09:51:09 +00:00
commands =
2020-02-04 13:07:13 +00:00
# install the dependencies:
2019-09-04 09:51:09 +00:00
pip install .[test]
2020-02-04 13:07:13 +00:00
# Run the test itself
2019-09-04 09:51:09 +00:00
coverage run -m unittest
2020-02-04 13:07:13 +00:00
# Dump coverage summary to console
2019-09-04 09:51:09 +00:00
coverage report --omit tests/*
2020-02-04 13:07:13 +00:00
# Convert coverage report to standard xml formula the filename includes the tox environment name
# https://tox.readthedocs.io/en/latest/config.html#environment-variable-substitutions
coverage xml --omit tests/* -o {env:TOX_ENV_NAME}_coverage.xml