Skip to content

Commit 56be7f1

Browse files
Fixes for Add clear and other parameter docs to assert_produces_warning
1 parent 2a9462a commit 56be7f1

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

pandas/util/testing.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2346,35 +2346,35 @@ def assert_produces_warning(expected_warning=Warning, filter_level="always",
23462346
23472347
Parameters
23482348
----------
2349-
expected_warning : class Warning|False|None, default Warning
2349+
expected_warning : {Warning, False, None}, default Warning
23502350
The type of Exception raised. ``exception.Warning`` is the base
23512351
class for all warnings. To check that no warning is returned,
23522352
specify ``False`` or ``None``.
23532353
filter_level : str, default "always"
23542354
Specifies whether warnings are ignored, displayed, or turned
23552355
into errors.
23562356
Valid values are:
2357-
"error" - turns matching warnings into exeptions
2358-
"ignore" - discard the warning
2359-
"always" - always emit a warning
2360-
"default" - print the warning the first time it is generated
2361-
from each location
2362-
"module" - print the warning the first time it is generated
2363-
from each module
2364-
"once" - print the warning the first time it is generated
2357+
* "error" - turns matching warnings into exeptions
2358+
* "ignore" - discard the warning
2359+
* "always" - always emit a warning
2360+
* "default" - print the warning the first time it is generated
2361+
from each location
2362+
* "module" - print the warning the first time it is generated
2363+
from each module
2364+
* "once" - print the warning the first time it is generated
23652365
clear : str, default None
23662366
If not ``None`` then remove any previously raised warnings from
23672367
the ``__warningsregistry__`` to ensure that no warning messages are
23682368
suppressed by this context manager. If ``None`` is specified,
23692369
the ``__warningsregistry__`` keeps track of which warnings have been
23702370
shown, and does not show them again.
2371-
check_stacklevel : bool, default true
2371+
check_stacklevel : bool, default True
23722372
If True, displays the line that called the function containing
23732373
the warning to show were the function is called. Otherwise, the
23742374
line that implements the function is displayed.
23752375
23762376
Examples
2377-
----------
2377+
--------
23782378
>>> import warnings
23792379
>>> with assert_produces_warning():
23802380
... warnings.warn(UserWarning())

0 commit comments

Comments
 (0)