Movatterモバイル変換


[0]ホーム

URL:


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

Commit7723ce8

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 commite63f6e5)
1 parent2c94c4a commit7723ce8

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
returncast(type[BaseExcT_1],origin_exc)
458458
else:
459459
raiseValueError(
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
deftest_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
withpytest.raises(ValueError,match=fail_msg):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp