summaryrefslogtreecommitdiffstats
path: root/Lib/unittest
diff options
context:
space:
mode:
authorMichael Foord <michael@voidspace.org.uk>2012-03-25 22:27:12 (GMT)
committerMichael Foord <michael@voidspace.org.uk>2012-03-25 22:27:12 (GMT)
commit0340ea77d1c7443b6df5a1fdbf0c33110230a12e (patch)
tree0e76e07a845459a42e758f6dad4e99a04ea0649e /Lib/unittest
parent944e02d055d10325968b778c0188df1e150b2bc7 (diff)
downloadcpython-0340ea77d1c7443b6df5a1fdbf0c33110230a12e.zip
cpython-0340ea77d1c7443b6df5a1fdbf0c33110230a12e.tar.gz
cpython-0340ea77d1c7443b6df5a1fdbf0c33110230a12e.tar.bz2
unittest.mock: removed another bit of Python 2 only code
Diffstat (limited to 'Lib/unittest')
-rw-r--r--Lib/unittest/mock.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py
index 5688af3..a45a7a8 100644
--- a/Lib/unittest/mock.py
+++ b/Lib/unittest/mock.py
@@ -1086,12 +1086,6 @@ class _patch(object):
patching.__exit__(*exc_info)
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