mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
unittest.mock: removed another bit of Python 2 only code
This commit is contained in:
parent
944e02d055
commit
0340ea77d1
1 changed files with 0 additions and 6 deletions
|
@ -1086,12 +1086,6 @@ class _patch(object):
|
||||||
patching.__exit__(*exc_info)
|
patching.__exit__(*exc_info)
|
||||||
|
|
||||||
patched.patchings = [self]
|
patched.patchings = [self]
|
||||||
if hasattr(func, 'func_code'):
|
|
||||||
# not in Python 3
|
|
||||||
patched.compat_co_firstlineno = getattr(
|
|
||||||
func, "compat_co_firstlineno",
|
|
||||||
func.func_code.co_firstlineno
|
|
||||||
)
|
|
||||||
return patched
|
return patched
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue