Skip to content

Commit 5833f86

Browse files
ensure doctest collection does not fail
1 parent 32f6d1c commit 5833f86

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

pandas/core/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ class option_context(object):
384384
--------
385385
386386
>>> with option_context('display.max_rows', 10, 'display.max_columns', 5):
387-
...
387+
... ...
388388
389389
"""
390390

pandas/util/testing.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ def _valid_locales(locales, normalize):
554554

555555

556556
def capture_stdout(f):
557-
"""
557+
r"""
558558
Decorator to capture stdout in a buffer so that it can be checked
559559
(or suppressed) during testing.
560560
@@ -572,7 +572,6 @@ def capture_stdout(f):
572572
--------
573573
574574
>>> from pandas.util.testing import capture_stdout
575-
>>>
576575
>>> import sys
577576
>>>
578577
>>> @capture_stdout
@@ -602,7 +601,7 @@ def wrapper(*args, **kwargs):
602601

603602

604603
def capture_stderr(f):
605-
"""
604+
r"""
606605
Decorator to capture stderr in a buffer so that it can be checked
607606
(or suppressed) during testing.
608607
@@ -620,7 +619,6 @@ def capture_stderr(f):
620619
--------
621620
622621
>>> from pandas.util.testing import capture_stderr
623-
>>>
624622
>>> import sys
625623
>>>
626624
>>> @capture_stderr
@@ -2304,7 +2302,7 @@ def stdin_encoding(encoding=None):
23042302

23052303
def assert_raises_regex(_exception, _regexp, _callable=None,
23062304
*args, **kwargs):
2307-
r"""
2305+
"""
23082306
Check that the specified Exception is raised and that the error message
23092307
matches a given regular expression pattern. This may be a regular
23102308
expression object or a string containing a regular expression suitable
@@ -2330,6 +2328,7 @@ def assert_raises_regex(_exception, _regexp, _callable=None,
23302328
AssertionError: "pear" does not match "'apple'"
23312329
23322330
You can also use this in a with statement.
2331+
23332332
>>> with assert_raises_regex(TypeError, 'unsupported operand type\(s\)'):
23342333
... 1 + {}
23352334
>>> with assert_raises_regex(TypeError, 'banana'):

0 commit comments

Comments
 (0)