mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
This commit is contained in:
parent
4d85f0ae76
commit
e3671ead94
1 changed files with 16 additions and 1 deletions
|
@ -2488,7 +2488,7 @@ class Wrapper:
|
|||
self.func(*args, **kwargs)
|
||||
|
||||
@Wrapper
|
||||
def test_look_in_unwrapped():
|
||||
def wrapped():
|
||||
"""
|
||||
Docstrings in wrapped functions must be detected as well.
|
||||
|
||||
|
@ -2496,6 +2496,21 @@ def test_look_in_unwrapped():
|
|||
'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
|
||||
"""
|
||||
|
||||
if support.check_impl_detail(cpython=True):
|
||||
def test_wrapped_c_func():
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue