mirror of
https://github.com/clearml/wexpect-venv
synced 2025-06-26 18:15:52 +00:00
[CLN] clean CI testcases: merge and reduce installed and default testcases
This commit is contained in:
parent
be7bd4be4f
commit
96987d4030
40
tox.ini
40
tox.ini
@ -3,14 +3,12 @@
|
|||||||
|
|
||||||
[tox]
|
[tox]
|
||||||
# The following configuration will run automatically.
|
# The following configuration will run automatically.
|
||||||
envlist = py{37}-{default,legacy_wexpect,spawn_pipe},installed,pyinstaller
|
envlist = py{37}-{legacy_wexpect,spawn_pipe},installed,pyinstaller
|
||||||
|
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
description = Unit tests
|
description = Unit tests
|
||||||
|
|
||||||
passenv =
|
|
||||||
WEXPECT_*
|
|
||||||
|
|
||||||
# Set environment variables to select the proper configuration for each envirnment.
|
# Set environment variables to select the proper configuration for each envirnment.
|
||||||
setenv =
|
setenv =
|
||||||
spawn_pipe: WEXPECT_SPAWN_CLASS=SpawnPipe
|
spawn_pipe: WEXPECT_SPAWN_CLASS=SpawnPipe
|
||||||
@ -33,48 +31,46 @@ commands =
|
|||||||
# https://tox.readthedocs.io/en/latest/config.html#environment-variable-substitutions
|
# https://tox.readthedocs.io/en/latest/config.html#environment-variable-substitutions
|
||||||
coverage xml --omit=tests/*,site-packages -o {env:TOX_ENV_NAME}_coverage.xml
|
coverage xml --omit=tests/*,site-packages -o {env:TOX_ENV_NAME}_coverage.xml
|
||||||
|
|
||||||
|
|
||||||
[testenv:installed]
|
[testenv:installed]
|
||||||
# normal tests test the cloned files. This testenv tests the installation itself.
|
# normal tests test the cloned files. This testenv tests the installation itself, with the default
|
||||||
description = Unit tests installed
|
# spawn class.
|
||||||
|
description = Unit tests installed, and default spawn class.
|
||||||
|
|
||||||
changedir = test_01_installed
|
changedir = test_01_installed
|
||||||
|
|
||||||
whitelist_externals =
|
whitelist_externals =
|
||||||
cp
|
cp
|
||||||
|
|
||||||
# Appveyor will set the WEXPECT_SPAWN_CLASS to run the proper configuration for each run.
|
|
||||||
passenv =
|
|
||||||
WEXPECT_*
|
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
|
|
||||||
# copy all testcase into working dir
|
# copy all testcase into working dir
|
||||||
cp -r ../tests tests
|
cp -r ../tests tests
|
||||||
|
|
||||||
# Run the test itself
|
# Run the test itself. Running all tests is not needed, because it just test the installation,
|
||||||
python -m unittest
|
# not functions.
|
||||||
|
python -m unittest tests.test_misc
|
||||||
|
|
||||||
|
|
||||||
[testenv:pyinstaller]
|
[testenv:pyinstaller]
|
||||||
# Test if wexpect working with pyinstaller. See #12 for more details.
|
# Test if wexpect working with pyinstaller. See #12 for more details.
|
||||||
description = Unit tests pyinstaller
|
description = Unit tests pyinstaller
|
||||||
|
|
||||||
whitelist_externals =
|
whitelist_externals =
|
||||||
pyinstaller
|
pyinstaller
|
||||||
pyinstaller_test
|
pyinstaller_test
|
||||||
|
|
||||||
setenv =
|
setenv =
|
||||||
WEXPECT_SPAWN_CLASS=SpawnPipe
|
WEXPECT_SPAWN_CLASS=SpawnPipe
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
# install the dependencies:
|
# install the dependencies:
|
||||||
pip install .[test]
|
pip install .[test]
|
||||||
|
|
||||||
# create wexpect executable for console-reader.
|
# create wexpect executable for console-reader.
|
||||||
pyinstaller wexpect.spec
|
pyinstaller wexpect.spec
|
||||||
|
|
||||||
# create test executable, to thest the console-reader
|
# create test executable, to thest the console-reader
|
||||||
pyinstaller tests/pyinstaller_test.py
|
pyinstaller tests/pyinstaller_test.py
|
||||||
|
|
||||||
# run test:
|
# run test:
|
||||||
dist\pyinstaller_test\pyinstaller_test.exe
|
dist\pyinstaller_test\pyinstaller_test.exe
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user