Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7c9cba0

Browse files
gomri15Zac-HD
andauthored
Apply suggestion from @Zac-HD
Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>
1 parent 2d37732 commit 7c9cba0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

‎src/_pytest/reports.py‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -420,11 +420,9 @@ def from_item_and_call(cls, item: Item, call: CallInfo[None]) -> TestReport:
420420
longrepr = (os.fspath(path), line + 1, r.message)
421421
else:
422422
longrepr = (str(r.path), r.lineno, r.message)
423-
elif isinstance(excinfo.value, BaseExceptionGroup):
424-
if excinfo.value.exceptions and any(
425-
isinstance(exception, skip.Exception)
426-
for exception in excinfo.value.exceptions
427-
):
423+
elif isinstance(excinfo.value, BaseExceptionGroup) and (
424+
excinfo.value.split(skip.Exception)[1] is None
425+
):
428426
outcome = "skipped"
429427
skipped_exceptions = cast(
430428
Sequence[BaseException], excinfo.value.exceptions

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /