Michael Foord added the comment:
Thanks for picking this up. /file/open/ should be fine.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20222
___
Changes by Terry J. Reedy tjre...@udel.edu:
--
assignee: docs@python - terry.reedy
versions: -Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20222
___
Roundup Robot added the comment:
New changeset 36c9a233ebf0 by Terry Jan Reedy in branch '3.3':
Issue #20222: file is no longer a builtin in 3.x.
http://hg.python.org/cpython/rev/36c9a233ebf0
--
nosy: +python-dev
___
Python tracker
Changes by Terry J. Reedy tjre...@udel.edu:
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20222
Terry J. Reedy added the comment:
I think /file/open/ would work.
--
nosy: +michael.foord, terry.reedy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20222
___
New submission from INADA Naoki:
http://docs.python.org/3.3/library/unittest.mock-examples.html#mocking-chained-calls
Let’s assume the object it returns is ‘file-like’, so we’ll ensure that our
response object uses the builtin file as its spec.
and
mock_response = Mock(spec=file)