Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion Lib/test/test_doctest/test_doctest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2545,14 +2545,29 @@ def __call__(self, *args, **kwargs):
self.func(*args, **kwargs)

@Wrapper
def test_look_in_unwrapped():
def wrapped():
"""
Docstrings in wrapped functions must be detected as well.

>>> 'one other test'
'one other test'
"""

def test_look_in_unwrapped():
"""
Ensure that wrapped doctests work correctly.

>>> import doctest
>>> doctest.run_docstring_examples(
... wrapped, {}, name=wrapped.__name__, verbose=True)
Finding tests in wrapped
Trying:
'one other test'
Expecting:
'one other test'
ok
"""

@doctest_skip_if(support.check_impl_detail(cpython=False))
def test_wrapped_c_func():
"""
Expand Down