[issue20222] unittest.mock-examples doc uses builtin file which is removed in Python 3

INADA Naoki report at bugs.python.org
Sat Jan 11 19:25:49 CET 2014


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)

----------
assignee: docs at python
components: Documentation
messages: 207908
nosy: docs at python, naoki
priority: normal
severity: normal
status: open
title: unittest.mock-examples doc uses builtin file which is removed in Python 3
versions: Python 3.3, Python 3.4, Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20222>
_______________________________________


More information about the Python-bugs-list mailing list