Merge pull request #12259 from bluetech/plain-raise

runner: avoid adding uninteresting entry to tracebacks
This commit is contained in:
Ran Benita 2024-04-28 11:21:15 +03:00 committed by GitHub
commit 127a372928
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -180,7 +180,7 @@ def pytest_runtest_call(item: Item) -> None:
assert e.__traceback__ is not None
# Skip *this* frame
sys.last_traceback = e.__traceback__.tb_next
raise e
raise
def pytest_runtest_teardown(item: Item, nextitem: Optional[Item]) -> None:
@ -512,7 +512,7 @@ class SetupState:
col.setup()
except TEST_OUTCOME as exc:
self.stack[col] = (self.stack[col][0], exc)
raise exc
raise
def addfinalizer(self, finalizer: Callable[[], object], node: Node) -> None:
"""Attach a finalizer to the given node.