Skip to content

Commit 572b565

Browse files
authored
Merge pull request #10767 from alexhad6/fix-typo-in-python_api.py
Fix typo in python_api.py
2 parents 44afed9 + 135600f commit 572b565

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/_pytest/python_api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ def raises( # noqa: F811
808808
809809
:param typing.Type[E] | typing.Tuple[typing.Type[E], ...] expected_exception:
810810
The expected exception type, or a tuple if one of multiple possible
811-
exception types are excepted.
811+
exception types are expected.
812812
:kwparam str | typing.Pattern[str] | None match:
813813
If specified, a string containing a regular expression,
814814
or a regular expression object, that is tested against the string
@@ -924,10 +924,10 @@ def raises( # noqa: F811
924924
f"any special code to say 'this should never raise an exception'."
925925
)
926926
if isinstance(expected_exception, type):
927-
excepted_exceptions: Tuple[Type[E], ...] = (expected_exception,)
927+
expected_exceptions: Tuple[Type[E], ...] = (expected_exception,)
928928
else:
929-
excepted_exceptions = expected_exception
930-
for exc in excepted_exceptions:
929+
expected_exceptions = expected_exception
930+
for exc in expected_exceptions:
931931
if not isinstance(exc, type) or not issubclass(exc, BaseException):
932932
msg = "expected exception must be a BaseException type, not {}" # type: ignore[unreachable]
933933
not_a = exc.__name__ if isinstance(exc, type) else type(exc).__name__

0 commit comments

Comments
 (0)