@@ -554,7 +554,7 @@ def _valid_locales(locales, normalize):
554
554
555
555
556
556
def capture_stdout (f ):
557
- """
557
+ r """
558
558
Decorator to capture stdout in a buffer so that it can be checked
559
559
(or suppressed) during testing.
560
560
@@ -572,7 +572,6 @@ def capture_stdout(f):
572
572
--------
573
573
574
574
>>> from pandas.util.testing import capture_stdout
575
- >>>
576
575
>>> import sys
577
576
>>>
578
577
>>> @capture_stdout
@@ -602,7 +601,7 @@ def wrapper(*args, **kwargs):
602
601
603
602
604
603
def capture_stderr (f ):
605
- """
604
+ r """
606
605
Decorator to capture stderr in a buffer so that it can be checked
607
606
(or suppressed) during testing.
608
607
@@ -620,7 +619,6 @@ def capture_stderr(f):
620
619
--------
621
620
622
621
>>> from pandas.util.testing import capture_stderr
623
- >>>
624
622
>>> import sys
625
623
>>>
626
624
>>> @capture_stderr
@@ -2304,7 +2302,7 @@ def stdin_encoding(encoding=None):
2304
2302
2305
2303
def assert_raises_regex (_exception , _regexp , _callable = None ,
2306
2304
* args , ** kwargs ):
2307
- r """
2305
+ """
2308
2306
Check that the specified Exception is raised and that the error message
2309
2307
matches a given regular expression pattern. This may be a regular
2310
2308
expression object or a string containing a regular expression suitable
@@ -2330,6 +2328,7 @@ def assert_raises_regex(_exception, _regexp, _callable=None,
2330
2328
AssertionError: "pear" does not match "'apple'"
2331
2329
2332
2330
You can also use this in a with statement.
2331
+
2333
2332
>>> with assert_raises_regex(TypeError, 'unsupported operand type\(s\)'):
2334
2333
... 1 + {}
2335
2334
>>> with assert_raises_regex(TypeError, 'banana'):
0 commit comments