1
1
Fork 0

Use --durations instead of --duration for pytest

Newer pytest no longer accepts --duration as an alias for --durations.
Esse commit está contido em:
Nguyễn Gia Phong 2020-08-15 21:22:13 +07:00
commit 530463879e
4 arquivos alterados com 6 adições e 6 exclusões

Ver arquivo

@ -43,7 +43,7 @@ steps:
# https://bugs.python.org/issue18199
$env:TEMP = "R:\Temp"
tox -e py -- -m integration -n auto --duration=5 --junit-xml=junit/integration-test.xml
tox -e py -- -m integration -n auto --durations=5 --junit-xml=junit/integration-test.xml
displayName: Tox run integration tests
- task: PublishTestResults@2

Ver arquivo

@ -11,10 +11,10 @@ steps:
displayName: Tox run unit tests
# Run integration tests in two groups so we will fail faster if there is a failure in the first group
- script: tox -e py -- -m integration -n auto --duration=5 -k "not test_install" --junit-xml=junit/integration-test-group0.xml
- script: tox -e py -- -m integration -n auto --durations=5 -k "not test_install" --junit-xml=junit/integration-test-group0.xml
displayName: Tox run Group 0 integration tests
- script: tox -e py -- -m integration -n auto --duration=5 -k "test_install" --junit-xml=junit/integration-test-group1.xml
- script: tox -e py -- -m integration -n auto --durations=5 -k "test_install" --junit-xml=junit/integration-test-group1.xml
displayName: Tox run Group 1 integration tests
- task: PublishTestResults@2

Ver arquivo

@ -49,15 +49,15 @@ if [[ "$GROUP" == "1" ]]; then
# Unit tests
tox -- --use-venv -m unit -n auto
# Integration tests (not the ones for 'pip install')
tox -- -m integration -n auto --duration=5 -k "not test_install" \
tox -- -m integration -n auto --durations=5 -k "not test_install" \
--use-venv $RESOLVER_SWITCH
elif [[ "$GROUP" == "2" ]]; then
# Separate Job for running integration tests for 'pip install'
tox -- -m integration -n auto --duration=5 -k "test_install" \
tox -- -m integration -n auto --durations=5 -k "test_install" \
--use-venv $RESOLVER_SWITCH
elif [[ "$GROUP" == "3" ]]; then
# Separate Job for tests that fail with the new resolver
tox -- -m fails_on_new_resolver -n auto --duration=5 \
tox -- -m fails_on_new_resolver -n auto --durations=5 \
--use-venv $RESOLVER_SWITCH --new-resolver-runtests
else
# Non-Testing Jobs should run once