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
|
||||
that's aware of mock objects and doesn't recurse on them
|
||||
"""
|
||||
real_unwrap = getattr(inspect, "unwrap", None)
|
||||
if real_unwrap is None:
|
||||
yield
|
||||
else:
|
||||
real_unwrap = inspect.unwrap
|
||||
|
||||
def _mock_aware_unwrap(obj, stop=None):
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue