Skip to content

Commit e711e93

Browse files
committed
Update clear_exception_traceback fixture
1 parent f3c7bd7 commit e711e93

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/conftest.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -353,11 +353,17 @@ def caplog_fixture(caplog: pytest.LogCaptureFixture) -> pytest.LogCaptureFixture
353353

354354

355355
@pytest.fixture(autouse=True)
356-
def clear_exception_tracback(request: pytest.FixtureRequest) -> Generator[None]:
356+
def clear_exception_traceback(request: pytest.FixtureRequest) -> Generator[None]:
357357
"""Clear exception traceback after each test."""
358358
exceptions = []
359359
for fixture_name in request.fixturenames:
360-
if fixture_name not in ("exception", "side_effect"):
360+
if fixture_name not in (
361+
"error",
362+
"exc",
363+
"exception",
364+
"side_effect",
365+
"sideeffect",
366+
):
361367
continue
362368
if isinstance(request.getfixturevalue(fixture_name), BaseException):
363369
exceptions.append(request.getfixturevalue(fixture_name))

0 commit comments

Comments
 (0)