From 252729c49389afba8c6003d7bebd42b3064e683a Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Mon, 26 Nov 2018 10:46:58 +0000 Subject: [PATCH 1/6] WIP: unifying script_single and script_multi --- .travis.yml | 24 +++++++++------------ ci/azure/linux.yml | 10 ++++----- ci/run_tests.sh | 43 ++++++++++++++++++++++++++++++++++++++ ci/script_multi.sh | 51 --------------------------------------------- ci/script_single.sh | 41 ------------------------------------ pandas/conftest.py | 15 ------------- 6 files changed, 57 insertions(+), 127 deletions(-) create mode 100755 ci/run_tests.sh delete mode 100755 ci/script_multi.sh delete mode 100755 ci/script_single.sh diff --git a/.travis.yml b/.travis.yml index 6d31adcbf8a43..f79d08ff2b362 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,28 +34,28 @@ matrix: include: - dist: trusty env: - - JOB="3.7" ENV_FILE="ci/deps/travis-37.yaml" TEST_ARGS="--skip-slow --skip-network" + - JOB="3.7" ENV_FILE="ci/deps/travis-37.yaml" PATTERN="not slow and not network" - dist: trusty env: - - JOB="2.7, locale, slow, old NumPy" ENV_FILE="ci/deps/travis-27-locale.yaml" LOCALE_OVERRIDE="zh_CN.UTF-8" SLOW=true + - JOB="2.7, locale, slow, old NumPy" ENV_FILE="ci/deps/travis-27-locale.yaml" LOCALE_OVERRIDE="zh_CN.UTF-8" PATTERN="slow" addons: apt: packages: - language-pack-zh-hans - dist: trusty env: - - JOB="2.7" ENV_FILE="ci/deps/travis-27.yaml" TEST_ARGS="--skip-slow" + - JOB="2.7" ENV_FILE="ci/deps/travis-27.yaml" PATTERN="not slow" addons: apt: packages: - python-gtk2 - dist: trusty env: - - JOB="3.6, lint, coverage" ENV_FILE="ci/deps/travis-36.yaml" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate" COVERAGE=true LINT=true + - JOB="3.6, lint, coverage" ENV_FILE="ci/deps/travis-36.yaml" PATTERN="not slow and not network" PANDAS_TESTING_MODE="deprecate" COVERAGE=true LINT=true - dist: trusty env: - - JOB="3.7, NumPy dev" ENV_FILE="ci/deps/travis-37-numpydev.yaml" TEST_ARGS="--skip-slow --skip-network -W error" PANDAS_TESTING_MODE="deprecate" + - JOB="3.7, NumPy dev" ENV_FILE="ci/deps/travis-37-numpydev.yaml" PATTERN="not slow and not network" TEST_ARGS="-W error" PANDAS_TESTING_MODE="deprecate" addons: apt: packages: @@ -64,7 +64,7 @@ matrix: # In allow_failures - dist: trusty env: - - JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" SLOW=true + - JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow" # In allow_failures - dist: trusty @@ -73,7 +73,7 @@ matrix: allow_failures: - dist: trusty env: - - JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" SLOW=true + - JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow" - dist: trusty env: - JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true @@ -106,20 +106,16 @@ before_script: script: - echo "script start" - ci/run_build_docs.sh - - ci/script_single.sh - - ci/script_multi.sh + - ci/run_tests.sh - ci/code_checks.sh -after_success: - - ci/upload_coverage.sh - after_script: - echo "after_script start" - source activate pandas && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd - if [ -e test-data-single.xml ]; then - ci/print_skipped.py test-data-single.xml; + ci/print_skipped.py test-data-single.xml; fi - if [ -e test-data-multiple.xml ]; then - ci/print_skipped.py test-data-multiple.xml; + ci/print_skipped.py test-data-multiple.xml; fi - echo "after_script done" diff --git a/ci/azure/linux.yml b/ci/azure/linux.yml index 23800f6719bfe..212e4e68de74c 100644 --- a/ci/azure/linux.yml +++ b/ci/azure/linux.yml @@ -13,20 +13,20 @@ jobs: ENV_FILE: ci/deps/azure-27-compat.yaml CONDA_PY: "27" CONDA_ENV: pandas - TEST_ARGS: "--skip-slow --skip-network" + PATTERN: "not slow and not network" py37_locale: ENV_FILE: ci/deps/azure-37-locale.yaml CONDA_PY: "37" CONDA_ENV: pandas - TEST_ARGS: "--skip-slow --skip-network" + PATTERN: "not slow and not network" LOCALE_OVERRIDE: "zh_CN.UTF-8" py36_locale_slow: ENV_FILE: ci/deps/azure-36-locale_slow.yaml CONDA_PY: "36" CONDA_ENV: pandas - TEST_ARGS: "--only-slow --skip-network" + PATTERN: "not slow and not network" LOCALE_OVERRIDE: "it_IT.UTF-8" steps: @@ -44,9 +44,7 @@ jobs: displayName: 'Build' - script: | export PATH=$HOME/miniconda3/bin:$PATH - ci/script_single.sh - ci/script_multi.sh - echo "[Test done]" + ci/run_tests.sh displayName: 'Test' - script: | export PATH=$HOME/miniconda3/bin:$PATH diff --git a/ci/run_tests.sh b/ci/run_tests.sh new file mode 100755 index 0000000000000..666c9727c05b4 --- /dev/null +++ b/ci/run_tests.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +PATTERN=$1 # e.g. "slow and not network" +LOCALE=$2 +COVERAGE=$3 + + +# Workaround for pytest-xdist flaky collection order +# https://github.com/pytest-dev/pytest/issues/920 +# https://github.com/pytest-dev/pytest/issues/1075 +export PYTHONHASHSEED=$(python -c 'import random; print(random.randint(1, 4294967295))') + +if [ -n "$LOCALE" ]; then + export LC_ALL="$LOCALE" + export LANG="$LOCALE" + PANDAS_ENCODING=`python -c 'import pandas; pandas.get_option("display.enconding")'` + echo "pandas detected console encoding: $PANDAS_ENCODING" +fi +if [[ "not network" == *"$PATTERN"* ]]; then + export http_proxy=http://1.2.3.4 https_proxy=http://1.2.3.4; +fi + + +for TYPE in single multiple +do + if [ "$COVERAGE" ]; then + COVERAGE_FNAME="/tmp/coc-$TYPE.xml" + COVERAGE="-s --cov=pandas --cov-report=xml:$COVERAGE_FNAME" + fi + + TYPE_PATTERN=$TYPE + NUM_JOBS=1 + if [[ "$TYPE_PATTERN" == "multiple" ]]; then + TYPE_PATTERN="not single" + NUM_JOBS=2 + fi + + # TODO if $PATTERN is empty, the -m expression will probably fail + pytest -m "$TYPE_PATTERN and $PATTERN" -n $NUM_JOBS -s --strict --durations=10 --junitxml=test-data-$TYPE.xml $COVERAGE + if [ "$COVERAGE" && $? == 0 ]; then + bash <(curl -s https://codecov.io/bash) -Z -c -F $TYPE -f $COVERAGE_FNAME + fi +done diff --git a/ci/script_multi.sh b/ci/script_multi.sh deleted file mode 100755 index 98dd5137bf5fb..0000000000000 --- a/ci/script_multi.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash -e - -echo "[script multi]" - -source activate pandas - -if [ -n "$LOCALE_OVERRIDE" ]; then - export LC_ALL="$LOCALE_OVERRIDE"; - export LANG="$LOCALE_OVERRIDE"; - echo "Setting LC_ALL to $LOCALE_OVERRIDE" - - pycmd='import pandas; print("pandas detected console encoding: %s" % pandas.get_option("display.encoding"))' - python -c "$pycmd" -fi - -# Enforce absent network during testing by faking a proxy -if echo "$TEST_ARGS" | grep -e --skip-network -q; then - export http_proxy=http://1.2.3.4 https_proxy=http://1.2.3.4; -fi - -# Workaround for pytest-xdist flaky collection order -# https://github.com/pytest-dev/pytest/issues/920 -# https://github.com/pytest-dev/pytest/issues/1075 -export PYTHONHASHSEED=$(python -c 'import random; print(random.randint(1, 4294967295))') -echo PYTHONHASHSEED=$PYTHONHASHSEED - -if [ "$DOC" ]; then - echo "We are not running pytest as this is a doc-build" - -elif [ "$COVERAGE" ]; then - echo pytest -s -n 2 -m "not single" --durations=10 --cov=pandas --cov-report xml:/tmp/cov-multiple.xml --junitxml=test-data-multiple.xml --strict $TEST_ARGS pandas - pytest -s -n 2 -m "not single" --durations=10 --cov=pandas --cov-report xml:/tmp/cov-multiple.xml --junitxml=test-data-multiple.xml --strict $TEST_ARGS pandas - -elif [ "$SLOW" ]; then - TEST_ARGS="--only-slow --skip-network" - # The `-m " and slow"` is redundant here, as `--only-slow` is already used (via $TEST_ARGS). But is needed, because with - # `--only-slow` fast tests are skipped, but each of them is printed in the log (which can be avoided with `-q`), - # and also added to `test-data-multiple.xml`, and then printed in the log in the call to `ci/print_skipped.py`. - # Printing them to the log makes the log exceed the maximum size allowed by Travis and makes the build fail. - echo pytest -n 2 -m "not single and slow" --durations=10 --junitxml=test-data-multiple.xml --strict $TEST_ARGS pandas - pytest -n 2 -m "not single and slow" --durations=10 --junitxml=test-data-multiple.xml --strict $TEST_ARGS pandas - -else - echo pytest -n 2 -m "not single" --durations=10 --junitxml=test-data-multiple.xml --strict $TEST_ARGS pandas - pytest -n 2 -m "not single" --durations=10 --junitxml=test-data-multiple.xml --strict $TEST_ARGS pandas # TODO: doctest - -fi - -RET="$?" - -exit "$RET" diff --git a/ci/script_single.sh b/ci/script_single.sh deleted file mode 100755 index ea0d48bc2da8a..0000000000000 --- a/ci/script_single.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -echo "[script_single]" - -source activate pandas - -if [ -n "$LOCALE_OVERRIDE" ]; then - echo "Setting LC_ALL and LANG to $LOCALE_OVERRIDE" - export LC_ALL="$LOCALE_OVERRIDE"; - export LANG="$LOCALE_OVERRIDE"; - - pycmd='import pandas; print("pandas detected console encoding: %s" % pandas.get_option("display.encoding"))' - python -c "$pycmd" -fi - -if [ "$SLOW" ]; then - TEST_ARGS="--only-slow --skip-network" -fi - -# Enforce absent network during testing by faking a proxy -if echo "$TEST_ARGS" | grep -e --skip-network -q; then - export http_proxy=http://1.2.3.4 https_proxy=http://1.2.3.4; -fi - -if [ "$DOC" ]; then - echo "We are not running pytest as this is a doc-build" - -elif [ "$COVERAGE" ]; then - echo pytest -s -m "single" --durations=10 --strict --cov=pandas --cov-report xml:/tmp/cov-single.xml --junitxml=test-data-single.xml $TEST_ARGS pandas - pytest -s -m "single" --durations=10 --strict --cov=pandas --cov-report xml:/tmp/cov-single.xml --junitxml=test-data-single.xml $TEST_ARGS pandas - echo pytest -s --strict scripts - pytest -s --strict scripts -else - echo pytest -m "single" --durations=10 --junitxml=test-data-single.xml --strict $TEST_ARGS pandas - pytest -m "single" --durations=10 --junitxml=test-data-single.xml --strict $TEST_ARGS pandas - -fi - -RET="$?" - -exit "$RET" diff --git a/pandas/conftest.py b/pandas/conftest.py index f450193d9388e..6c536104c54f7 100644 --- a/pandas/conftest.py +++ b/pandas/conftest.py @@ -28,28 +28,13 @@ def pytest_addoption(parser): - parser.addoption("--skip-slow", action="store_true", - help="skip slow tests") - parser.addoption("--skip-network", action="store_true", - help="skip network tests") parser.addoption("--run-high-memory", action="store_true", help="run high memory tests") - parser.addoption("--only-slow", action="store_true", - help="run only slow tests") parser.addoption("--strict-data-files", action="store_true", help="Fail if a test is skipped for missing data file.") def pytest_runtest_setup(item): - if 'slow' in item.keywords and item.config.getoption("--skip-slow"): - pytest.skip("skipping due to --skip-slow") - - if 'slow' not in item.keywords and item.config.getoption("--only-slow"): - pytest.skip("skipping due to --only-slow") - - if 'network' in item.keywords and item.config.getoption("--skip-network"): - pytest.skip("skipping due to --skip-network") - if 'high_memory' in item.keywords and not item.config.getoption( "--run-high-memory"): pytest.skip( From 12bb05948215b10e2fa1d573de2888f9d2256b46 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Mon, 26 Nov 2018 11:26:49 +0000 Subject: [PATCH 2/6] Unified scripts that run the tests (single and multi) --- .circleci/config.yml | 4 ++-- ci/azure/macos.yml | 6 ++---- ci/azure/windows-py27.yml | 2 +- ci/azure/windows.yml | 2 +- ci/run_tests.sh | 29 ++++++++++++++++------------- ci/upload_coverage.sh | 11 ----------- 6 files changed, 22 insertions(+), 32 deletions(-) delete mode 100755 ci/upload_coverage.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index dc4162a0674fd..6b516b21722ac 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,5 +34,5 @@ jobs: command: | export PATH="$MINICONDA_DIR/bin:$PATH" source activate pandas-dev - echo "pytest --strict --durations=10 --color=no --junitxml=$CIRCLE_TEST_REPORTS/reports/junit.xml --skip-slow --skip-network pandas" - pytest --strict --durations=10 --color=no --junitxml=$CIRCLE_TEST_REPORTS/reports/junit.xml --skip-slow --skip-network pandas + echo "pytest -m "not slow and not network" --strict --durations=10 --color=no --junitxml=$CIRCLE_TEST_REPORTS/reports/junit.xml pandas" + pytest -m "not slow and not network" --strict --durations=10 --color=no --junitxml=$CIRCLE_TEST_REPORTS/reports/junit.xml pandas diff --git a/ci/azure/macos.yml b/ci/azure/macos.yml index d537f0c70cbec..98409576a5a87 100644 --- a/ci/azure/macos.yml +++ b/ci/azure/macos.yml @@ -12,7 +12,7 @@ jobs: py35_np_120: ENV_FILE: ci/deps/azure-macos-35.yaml CONDA_PY: "35" - TEST_ARGS: "--skip-slow --skip-network" + PATTERN: "not slow and not network" steps: - script: | @@ -31,9 +31,7 @@ jobs: - script: | export PATH=$HOME/miniconda3/bin:$PATH source activate pandas-dev - ci/script_single.sh - ci/script_multi.sh - echo "[Test done]" + ci/run_tests.sh displayName: 'Test' - script: | export PATH=$HOME/miniconda3/bin:$PATH diff --git a/ci/azure/windows-py27.yml b/ci/azure/windows-py27.yml index ac918f3becd2e..0d9aea816c4ad 100644 --- a/ci/azure/windows-py27.yml +++ b/ci/azure/windows-py27.yml @@ -37,7 +37,7 @@ jobs: displayName: 'Build' - script: | call activate pandas-dev - pytest --junitxml=test-data.xml --skip-slow --skip-network pandas -n 2 -r sxX --strict --durations=10 %* + pytest -m "not slow and not network" --junitxml=test-data.xml pandas -n 2 -r sxX --strict --durations=10 %* displayName: 'Test' - task: PublishTestResults@2 inputs: diff --git a/ci/azure/windows.yml b/ci/azure/windows.yml index f0ebba509e441..b69c210ca27ba 100644 --- a/ci/azure/windows.yml +++ b/ci/azure/windows.yml @@ -28,7 +28,7 @@ jobs: displayName: 'Build' - script: | call activate pandas-dev - pytest --junitxml=test-data.xml --skip-slow --skip-network pandas -n 2 -r sxX --strict --durations=10 %* + pytest -m "not slow and not network" --junitxml=test-data.xml pandas -n 2 -r sxX --strict --durations=10 %* displayName: 'Test' - task: PublishTestResults@2 inputs: diff --git a/ci/run_tests.sh b/ci/run_tests.sh index 666c9727c05b4..7c6f93c754a73 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -1,26 +1,29 @@ #!/bin/bash -PATTERN=$1 # e.g. "slow and not network" -LOCALE=$2 -COVERAGE=$3 - - # Workaround for pytest-xdist flaky collection order # https://github.com/pytest-dev/pytest/issues/920 # https://github.com/pytest-dev/pytest/issues/1075 export PYTHONHASHSEED=$(python -c 'import random; print(random.randint(1, 4294967295))') -if [ -n "$LOCALE" ]; then - export LC_ALL="$LOCALE" - export LANG="$LOCALE" - PANDAS_ENCODING=`python -c 'import pandas; pandas.get_option("display.enconding")'` - echo "pandas detected console encoding: $PANDAS_ENCODING" +if [ -n "$LOCALE_OVERRIDE" ]; then + export LC_ALL="$LOCALE_OVERRIDE" + export LANG="$LOCALE_OVERRIDE" + PANDAS_LOCALE=`python -c 'import pandas; pandas.get_option("display.encoding")'` + if [[ "$LOCALE_OVERIDE" != "$PANDAS_LOCALE" ]]; then + echo "pandas could not detect the locale. System locale: $LOCALE_OVERRIDE, pandas detected: $PANDAS_LOCALE" + # TODO Not really aborting the tests until https://github.com/pandas-dev/pandas/issues/23923 is fixed + # exit 1 + fi fi if [[ "not network" == *"$PATTERN"* ]]; then export http_proxy=http://1.2.3.4 https_proxy=http://1.2.3.4; fi +if [ -n "$PATTERN" ]; then + PATTERN=" and $PATTERN" +fi + for TYPE in single multiple do if [ "$COVERAGE" ]; then @@ -35,9 +38,9 @@ do NUM_JOBS=2 fi - # TODO if $PATTERN is empty, the -m expression will probably fail - pytest -m "$TYPE_PATTERN and $PATTERN" -n $NUM_JOBS -s --strict --durations=10 --junitxml=test-data-$TYPE.xml $COVERAGE - if [ "$COVERAGE" && $? == 0 ]; then + pytest -m \"$TYPE_PATTERN$PATTERN\" -n $NUM_JOBS -s --strict --durations=10 --junitxml=test-data-$TYPE.xml $COVERAGE pandas + + if [[ "$COVERAGE" && $? == 0 ]]; then bash <(curl -s https://codecov.io/bash) -Z -c -F $TYPE -f $COVERAGE_FNAME fi done diff --git a/ci/upload_coverage.sh b/ci/upload_coverage.sh deleted file mode 100755 index 88aca20590505..0000000000000 --- a/ci/upload_coverage.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -if [ -z "$COVERAGE" ]; then - echo "coverage is not selected for this build" - exit 0 -fi - - -echo "uploading coverage" -bash <(curl -s https://codecov.io/bash) -Z -c -F single -f /tmp/cov-single.xml -bash <(curl -s https://codecov.io/bash) -Z -c -F multiple -f /tmp/cov-multiple.xml From 9fac328ed447abe618c5ef09d6b628b1b1fadfb3 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Mon, 26 Nov 2018 11:33:38 +0000 Subject: [PATCH 3/6] pending fixes --- ci/run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/run_tests.sh b/ci/run_tests.sh index 7c6f93c754a73..0b959f7ffff89 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -38,7 +38,7 @@ do NUM_JOBS=2 fi - pytest -m \"$TYPE_PATTERN$PATTERN\" -n $NUM_JOBS -s --strict --durations=10 --junitxml=test-data-$TYPE.xml $COVERAGE pandas + pytest -m "$TYPE_PATTERN$PATTERN" -n $NUM_JOBS -s --strict --durations=10 --junitxml=test-data-$TYPE.xml $TEST_ARGS $COVERAGE pandas if [[ "$COVERAGE" && $? == 0 ]]; then bash <(curl -s https://codecov.io/bash) -Z -c -F $TYPE -f $COVERAGE_FNAME From 93c41db509f37b2a6533bd0a918cfda82edfa462 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Mon, 26 Nov 2018 11:51:58 +0000 Subject: [PATCH 4/6] logging when we upload the coverage --- ci/run_tests.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/run_tests.sh b/ci/run_tests.sh index 0b959f7ffff89..06d57cdc2384b 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -41,6 +41,7 @@ do pytest -m "$TYPE_PATTERN$PATTERN" -n $NUM_JOBS -s --strict --durations=10 --junitxml=test-data-$TYPE.xml $TEST_ARGS $COVERAGE pandas if [[ "$COVERAGE" && $? == 0 ]]; then + echo "uploading coverage for $TYPE tests" bash <(curl -s https://codecov.io/bash) -Z -c -F $TYPE -f $COVERAGE_FNAME fi done From a17a9ce5125a8749d68963fa675ffbfb135f36b4 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Thu, 29 Nov 2018 17:24:34 +0000 Subject: [PATCH 5/6] Restoring pytest --skip-slow... options --- pandas/conftest.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pandas/conftest.py b/pandas/conftest.py index b293e2b3b5c72..29c3abf4d1e1b 100644 --- a/pandas/conftest.py +++ b/pandas/conftest.py @@ -30,13 +30,28 @@ def pytest_addoption(parser): + parser.addoption("--skip-slow", action="store_true", + help="skip slow tests") + parser.addoption("--skip-network", action="store_true", + help="skip network tests") parser.addoption("--run-high-memory", action="store_true", help="run high memory tests") + parser.addoption("--only-slow", action="store_true", + help="run only slow tests") parser.addoption("--strict-data-files", action="store_true", help="Fail if a test is skipped for missing data file.") def pytest_runtest_setup(item): + if 'slow' in item.keywords and item.config.getoption("--skip-slow"): + pytest.skip("skipping due to --skip-slow") + + if 'slow' not in item.keywords and item.config.getoption("--only-slow"): + pytest.skip("skipping due to --only-slow") + + if 'network' in item.keywords and item.config.getoption("--skip-network"): + pytest.skip("skipping due to --skip-network") + if 'high_memory' in item.keywords and not item.config.getoption( "--run-high-memory"): pytest.skip( From 8c9b55783ebc1ead6591d27de9d132b964413ee8 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Thu, 29 Nov 2018 23:18:28 +0000 Subject: [PATCH 6/6] Not running tests on doc build --- ci/run_tests.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ci/run_tests.sh b/ci/run_tests.sh index 06d57cdc2384b..77efc60a8cf97 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -1,5 +1,10 @@ #!/bin/bash +if [ "$DOC" ]; then + echo "We are not running pytest as this is a doc-build" + exit 0 +fi + # Workaround for pytest-xdist flaky collection order # https://github.com/pytest-dev/pytest/issues/920 # https://github.com/pytest-dev/pytest/issues/1075