Skip to content

Commit 6b8eb10

Browse files
mitchh456claude
andcommitted
Simplify starlette tox config: test only starlette 1.0
Remove starlette 0.36 test envs (not relevant to the 1.0 compat PR). Run only starlette integration tests in starlette envs. Clean up debug annotations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9b4e356 commit 6b8eb10

2 files changed

Lines changed: 4 additions & 30 deletions

File tree

tests/conftest.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,6 @@
1010
import wrapt
1111
from webtest import TestApp
1212

13-
14-
# Temporary: output GitHub annotations for test failures so we can debug CI
15-
def pytest_runtest_makereport(item, call):
16-
"""Output GitHub Actions annotations for failed tests."""
17-
if call.excinfo is not None:
18-
import traceback
19-
20-
# Skip pytest.skip() and pytest.xfail() exceptions
21-
if call.excinfo.errisinstance((pytest.skip.Exception,)):
22-
return
23-
try:
24-
if call.excinfo.errisinstance((pytest.xfail.Exception,)):
25-
return
26-
except Exception:
27-
pass
28-
29-
tb = "".join(traceback.format_exception(call.excinfo.type, call.excinfo.value, call.excinfo.tb))
30-
msg = tb.replace("\n", "%0A").replace("\r", "%0D")
31-
fspath = str(item.fspath) if hasattr(item, "fspath") else ""
32-
line = item.reportinfo()[1] if item.reportinfo()[1] else 0
33-
phase = call.when
34-
print(f"\n::error file={fspath},line={line},title={phase.upper()} Failure: {item.nodeid}::{msg}")
35-
36-
3713
from scout_apm.core import error_service as scout_apm_core_error_service
3814
from scout_apm.core.agent import socket as scout_apm_core_socket
3915
from scout_apm.core.agent.manager import CoreAgentManager

tox.ini

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ envlist =
44
{py310,py311,py312,py313}-django{40,41,42},
55
{py310,py311,py312,py313}-django{50a,51,52},
66
py314-django52,
7-
{py310,py311,py312,py313}-starlette{036,10},
7+
{py310,py311,py312,py313}-starlette10,
88
[testenv]
99
passenv =
1010
ELASTICSEARCH_URL
@@ -52,9 +52,7 @@ deps =
5252
rq
5353
six
5454
sqlalchemy
55-
!starlette036-!starlette10: starlette
56-
starlette036: starlette>=0.36,<0.37
57-
starlette036: asgiref
55+
!starlette10: starlette
5856
starlette10: starlette>=1.0,<1.1
5957
starlette10: asgiref
6058
webtest
@@ -66,6 +64,6 @@ commands =
6664
commands =
6765
pytest {posargs} --asyncio-mode=auto
6866

69-
[testenv:py{310,311,312,313,314}-starlette{036,10}]
67+
[testenv:py{310,311,312,313}-starlette10]
7068
commands =
71-
pytest tests/integration/test_starlette.py {posargs} --asyncio-mode=auto --tb=short -v
69+
pytest tests/integration/test_starlette.py {posargs} --asyncio-mode=auto

0 commit comments

Comments
 (0)