summaryrefslogtreecommitdiffstats
path: root/Lib/unittest
diff options
context:
space:
mode:
authorMichael Foord <michael@voidspace.org.uk>2012-03-25 18:16:10 (GMT)
committerMichael Foord <michael@voidspace.org.uk>2012-03-25 18:16:10 (GMT)
commit1ab27c6fde2a7a8f66bcc158ef74975e269c9389 (patch)
tree94619bc6155765afbfefcb319185a7f9ee10bf5e /Lib/unittest
parent0dccf657b5112ad3fb11250ac8f9a70a89ea0c07 (diff)
downloadcpython-1ab27c6fde2a7a8f66bcc158ef74975e269c9389.zip
cpython-1ab27c6fde2a7a8f66bcc158ef74975e269c9389.tar.gz
cpython-1ab27c6fde2a7a8f66bcc158ef74975e269c9389.tar.bz2
Remove more Python 2 code from unittest.mock (obsolete function attributes)
Diffstat (limited to 'Lib/unittest')
-rw-r--r--Lib/unittest/mock.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py
index 1c7f33a..3cef550 100644
--- a/Lib/unittest/mock.py
+++ b/Lib/unittest/mock.py
@@ -2037,10 +2037,6 @@ def create_autospec(spec, spec_set=False, instance=False, _parent=None,
# MagicMock already does the useful magic methods for us
continue
- if isinstance(spec, FunctionTypes) and entry in FunctionAttributes:
- # allow a mock to actually be a function
- continue
-
# XXXX do we need a better way of getting attributes without
# triggering code execution (?) Probably not - we need the actual
# object to mock it so we would rather trigger a property than mock
@@ -2128,16 +2124,6 @@ FunctionTypes = (
type(_ANY.__eq__),
)
-FunctionAttributes = set([
- 'func_closure',
- 'func_code',
- 'func_defaults',
- 'func_dict',
- 'func_doc',
- 'func_globals',
- 'func_name',
-])
-
file_spec = None