[Python-checkins] cpython (3.3): Issue #20222: file is no longer a builtin in 3.x.

terry.reedy python-checkins at python.org
Tue Jan 21 06:02:38 CET 2014


http://hg.python.org/cpython/rev/36c9a233ebf0
changeset:   88598:36c9a233ebf0
branch:      3.3
parent:      88595:e1619465c49d
user:        Terry Jan Reedy <tjreedy at udel.edu>
date:        Tue Jan 21 00:01:51 2014 -0500
summary:
  Issue #20222: file is no longer a builtin in 3.x.

files:
  Doc/library/unittest.mock-examples.rst |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Doc/library/unittest.mock-examples.rst b/Doc/library/unittest.mock-examples.rst
--- a/Doc/library/unittest.mock-examples.rst
+++ b/Doc/library/unittest.mock-examples.rst
@@ -462,7 +462,7 @@
 we are only interested in the return value from the final call to
 `start_call` so we don't have much configuration to do. 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`.
+uses the builtin `open` as its `spec`.
 
 To do this we create a mock instance as our mock backend and create a mock
 response object for it. To set the response as the return value for that final
@@ -474,7 +474,7 @@
 method to directly set the return value for us:
 
     >>> something = Something()
-    >>> mock_response = Mock(spec=file)
+    >>> mock_response = Mock(spec=open)
     >>> mock_backend = Mock()
     >>> config = {'get_endpoint.return_value.create_call.return_value.start_call.return_value': mock_response}
     >>> mock_backend.configure_mock(**config)

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list