commit
e6ffa78e59
|
@ -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