Browse Source

Use --durations instead of --duration for pytest

Newer pytest no longer accepts --duration as an alias for --durations.
pull/8766/head
Nguyễn Gia Phong 2 months ago
parent
commit
530463879e
4 changed files with 6 additions and 6 deletions
  1. +1
    -1
      .azure-pipelines/steps/run-tests-windows.yml
  2. +2
    -2
      .azure-pipelines/steps/run-tests.yml
  3. +0
    -0
      news/946beace-6164-4d1a-a05d-e9bebf43ccd0.trivial
  4. +3
    -3
      tools/travis/run.sh

+ 1
- 1
.azure-pipelines/steps/run-tests-windows.yml View File

@@ -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


+ 2
- 2
.azure-pipelines/steps/run-tests.yml View File

@@ -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


+ 0
- 0
news/946beace-6164-4d1a-a05d-e9bebf43ccd0.trivial View File


+ 3
- 3
tools/travis/run.sh View File

@@ -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


Loading…
Cancel
Save