Skip to content

Commit 7723ce8

Browse files
The-Compilerpatchback[bot]
authored andcommitted
Merge pull request #13683 from even-even/fix_Exeption_to_Exception_in_errorMessage
fix: change Exeption to Exception in raises.py (cherry picked from commit e63f6e5)
1 parent 2c94c4a commit 7723ce8

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)