Merge pull request #12259 from bluetech/plain-raise
runner: avoid adding uninteresting entry to tracebacks
This commit is contained in:
commit
127a372928
|
@ -180,7 +180,7 @@ def pytest_runtest_call(item: Item) -> None:
|
||||||
assert e.__traceback__ is not None
|
assert e.__traceback__ is not None
|
||||||
# Skip *this* frame
|
# Skip *this* frame
|
||||||
sys.last_traceback = e.__traceback__.tb_next
|
sys.last_traceback = e.__traceback__.tb_next
|
||||||
raise e
|
raise
|
||||||
|
|
||||||
|
|
||||||
def pytest_runtest_teardown(item: Item, nextitem: Optional[Item]) -> None:
|
def pytest_runtest_teardown(item: Item, nextitem: Optional[Item]) -> None:
|
||||||
|
@ -512,7 +512,7 @@ class SetupState:
|
||||||
col.setup()
|
col.setup()
|
||||||
except TEST_OUTCOME as exc:
|
except TEST_OUTCOME as exc:
|
||||||
self.stack[col] = (self.stack[col][0], exc)
|
self.stack[col] = (self.stack[col][0], exc)
|
||||||
raise exc
|
raise
|
||||||
|
|
||||||
def addfinalizer(self, finalizer: Callable[[], object], node: Node) -> None:
|
def addfinalizer(self, finalizer: Callable[[], object], node: Node) -> None:
|
||||||
"""Attach a finalizer to the given node.
|
"""Attach a finalizer to the given node.
|
||||||
|
|
Loading…
Reference in New Issue