[Python-checkins] cpython (merge 3.5 -> default): Add versionchanged information for mock_open.

robert.collins python-checkins at python.org
Thu Jul 23 18:11:50 CEST 2015


https://hg.python.org/cpython/rev/262c43c71927
changeset:   97031:262c43c71927
parent:      97028:c896ab62ac75
parent:      97030:732de5ba1f2b
user:        Robert Collins <rbtcollins at hp.com>
date:        Fri Jul 24 04:10:49 2015 +1200
summary:
  Add versionchanged information for mock_open.

files:
  Doc/library/unittest.mock.rst |  8 ++++++++
  1 files changed, 8 insertions(+), 0 deletions(-)


diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst
--- a/Doc/library/unittest.mock.rst
+++ b/Doc/library/unittest.mock.rst
@@ -2043,6 +2043,14 @@
     is insufficient, one of the in-memory filesystem packages on `PyPI
     <https://pypi.python.org/pypi>`_ can offer a realistic filesystem for testing.
 
+   .. versionchanged:: 3.4
+      Added :meth:`~io.IOBase.readline` and :meth:`~io.IOBase.readlines` support.
+      The mock of :meth:`~io.IOBase.read` changed to consume *read_data* rather
+      than returning it on each call.
+
+   .. versionchanged:: 3.5
+      *read_data* is now reset on each call to the *mock*.
+
 Using :func:`open` as a context manager is a great way to ensure your file handles
 are closed properly and is becoming common::
 

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


More information about the Python-checkins mailing list