Refactoring doctests
This commit is contained in:
parent
3c9b46f781
commit
bf39e89946
|
@ -364,10 +364,7 @@ def _patch_unwrap_mock_aware():
|
||||||
contextmanager which replaces ``inspect.unwrap`` with a version
|
contextmanager which replaces ``inspect.unwrap`` with a version
|
||||||
that's aware of mock objects and doesn't recurse on them
|
that's aware of mock objects and doesn't recurse on them
|
||||||
"""
|
"""
|
||||||
real_unwrap = getattr(inspect, "unwrap", None)
|
real_unwrap = inspect.unwrap
|
||||||
if real_unwrap is None:
|
|
||||||
yield
|
|
||||||
else:
|
|
||||||
|
|
||||||
def _mock_aware_unwrap(obj, stop=None):
|
def _mock_aware_unwrap(obj, stop=None):
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue