From 699cdb93ed3eda8e0d85df9383aca91ff0a6695e Mon Sep 17 00:00:00 2001 From: aliowka Date: Wed, 17 Jun 2026 10:36:51 +0300 Subject: [PATCH] Fix exit code 5 in botocore/mitmproxy tox envs These envs filter tests with -m requires_botocore / -m requires_mitmproxy. When delta selects non-matching tests based on the diff, pytest finds no tests to run for that marker and exits with code 5 (no tests collected). Revert these three envs back to plain pytest since they are already highly filtered and delta provides no benefit here. --- tox.ini | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index a7bdab16e..8bae5ce5f 100644 --- a/tox.ini +++ b/tox.ini @@ -322,7 +322,9 @@ deps = {[testenv]deps} botocore>=1.13.45 commands = - delta run -- {posargs:--cov-config=pyproject.toml --cov=scrapy --cov-report=xml --cov-report= tests --junitxml=botocore.junit.xml -o junit_family=legacy} -m requires_botocore + # Not using delta run here: tests are already marker-filtered to -m requires_botocore. + # Delta selecting non-botocore tests then filtering by marker yields exit code 5 (no tests collected). + pytest {posargs:--cov-config=pyproject.toml --cov=scrapy --cov-report=xml --cov-report= tests --junitxml=botocore.junit.xml -o junit_family=legacy} -m requires_botocore [testenv:min-botocore] basepython = {[min]basepython} @@ -334,7 +336,8 @@ deps = setenv = {[min]setenv} commands = - delta run -- {posargs:--cov-config=pyproject.toml --cov=scrapy --cov-report=xml --cov-report= tests --junitxml=min-botocore.junit.xml -o junit_family=legacy} -m requires_botocore + # Not using delta run here: tests are already marker-filtered to -m requires_botocore. + pytest {posargs:--cov-config=pyproject.toml --cov=scrapy --cov-report=xml --cov-report= tests --junitxml=min-botocore.junit.xml -o junit_family=legacy} -m requires_botocore # Run proxy tests that use mitmproxy in a separate env to avoid installing @@ -348,4 +351,6 @@ deps = mitmproxy; implementation_name != "pypy" httpx[http2,socks] commands = - delta run -- {posargs:--cov-config=pyproject.toml --cov=scrapy --cov-report=xml --cov-report= tests --junitxml=mitmproxy.junit.xml -o junit_family=legacy} -m requires_mitmproxy + # Not using delta run here: tests are already marker-filtered to -m requires_mitmproxy. + # Delta selecting non-mitmproxy tests then filtering by marker yields exit code 5 (no tests collected). + pytest {posargs:--cov-config=pyproject.toml --cov=scrapy --cov-report=xml --cov-report= tests --junitxml=mitmproxy.junit.xml -o junit_family=legacy} -m requires_mitmproxy