Skip to content

Commit 3d09ab1

Browse files
committed
Remove workaround
1 parent 7bdc71a commit 3d09ab1

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

.vscode/launch.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
"debug-test"
1515
],
1616
"console": "integratedTerminal",
17-
"env": {
18-
// Enable break on exception when debugging tests (see: tests/conftest.py)
19-
"PYTEST_RAISE": "1",
20-
},
2117
}
2218
]
2319
}

tests/conftest.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +0,0 @@
1-
import os
2-
from typing import Any
3-
4-
import pytest
5-
6-
# Prevent pytest from catching exceptions when debugging in vscode so that break on
7-
# exception works correctly (see: https://github.com/pytest-dev/pytest/issues/7409)
8-
if os.getenv("PYTEST_RAISE", "0") == "1":
9-
10-
@pytest.hookimpl(tryfirst=True)
11-
def pytest_exception_interact(call: pytest.CallInfo[Any]):
12-
if call.excinfo is not None:
13-
raise call.excinfo.value
14-
else:
15-
raise RuntimeError(
16-
f"{call} has no exception data, an unknown error has occurred"
17-
)
18-
19-
@pytest.hookimpl(tryfirst=True)
20-
def pytest_internalerror(excinfo: pytest.ExceptionInfo[Any]):
21-
raise excinfo.value

0 commit comments

Comments
 (0)