Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Change assert_produces_warning behavior to check for all warnings b…
…y default
  • Loading branch information
Jorewin committed Feb 14, 2024
commit d47bf11172a6ac206dc20353b33b957c63cf3b9f
4 changes: 2 additions & 2 deletions pandas/_testing/_warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def assert_produces_warning(
check_stacklevel: bool = True,
raise_on_extra_warnings: bool = True,
match: str | tuple[str | None, ...] | None = None,
must_find_all_warnings: bool = False,
must_find_all_warnings: bool = True,
) -> Generator[list[warnings.WarningMessage], None, None]:
"""
Context manager for running code expected to either raise a specific warning,
Expand Down Expand Up @@ -74,7 +74,7 @@ class for all warnings. To raise multiple types of exceptions,
`expected_warning`. If additionally `must_find_all_warnings` is
True, each expected warning's message gets matched with a respective
match. Otherwise, multiple values get treated as an alternative.
must_find_all_warnings : bool, default False
must_find_all_warnings : bool, default True
If True and `expected_warning` is a tuple, each expected warning
type must get encountered. Otherwise, even one expected warning
results in success.
Expand Down