File tree Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Original file line number Diff line number Diff line change 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
22-
23-
241import os
252import unittest .mock as mock
263from typing import Any
You can’t perform that action at this time.
0 commit comments