Skip to content

Commit ca676bf

Browse files
authored
Merge pull request #13687 from pytest-dev/patchback/backports/8.4.x/e63f6e51c61fbe9ba6fb0acc436838d09fc5bf05/pr-13683
[PR #13683/e63f6e51 backport][8.4.x] fix: change Exeption to Exception in raises.py
2 parents 975a60a + 7723ce8 commit ca676bf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/_pytest/raises.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ def _parse_exc(
457457
return cast(type[BaseExcT_1], origin_exc)
458458
else:
459459
raise ValueError(
460-
f"Only `ExceptionGroup[Exception]` or `BaseExceptionGroup[BaseExeption]` "
460+
f"Only `ExceptionGroup[Exception]` or `BaseExceptionGroup[BaseException]` "
461461
f"are accepted as generic types but got `{exc}`. "
462462
f"As `raises` will catch all instances of the specified group regardless of the "
463463
f"generic argument specific nested exceptions has to be checked "

testing/python/raises_group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,7 @@ def test_parametrizing_conditional_raisesgroup(
13041304
def test_annotated_group() -> None:
13051305
# repr depends on if exceptiongroup backport is being used or not
13061306
t = repr(ExceptionGroup[ValueError])
1307-
msg = "Only `ExceptionGroup[Exception]` or `BaseExceptionGroup[BaseExeption]` are accepted as generic types but got `{}`. As `raises` will catch all instances of the specified group regardless of the generic argument specific nested exceptions has to be checked with `RaisesGroup`."
1307+
msg = "Only `ExceptionGroup[Exception]` or `BaseExceptionGroup[BaseException]` are accepted as generic types but got `{}`. As `raises` will catch all instances of the specified group regardless of the generic argument specific nested exceptions has to be checked with `RaisesGroup`."
13081308

13091309
fail_msg = wrap_escape(msg.format(t))
13101310
with pytest.raises(ValueError, match=fail_msg):

0 commit comments

Comments
 (0)