Merge pull request #11769 from neutrinoceros/fix_warns_docstring

Fix a mistake in pytest.warns' docstring (expect_warning accepts tuples, not any sequence)
This commit is contained in:
Ran Benita 2024-01-04 14:27:49 +02:00 committed by GitHub
commit c2a4a8d518
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ def warns( # noqa: F811
) -> Union["WarningsChecker", Any]: ) -> Union["WarningsChecker", Any]:
r"""Assert that code raises a particular class of warning. r"""Assert that code raises a particular class of warning.
Specifically, the parameter ``expected_warning`` can be a warning class or sequence Specifically, the parameter ``expected_warning`` can be a warning class or tuple
of warning classes, and the code inside the ``with`` block must issue at least one of warning classes, and the code inside the ``with`` block must issue at least one
warning of that class or classes. warning of that class or classes.