[Python-checkins] cpython (merge 3.4 -> 3.5): 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/732de5ba1f2b
changeset: 97030:732de5ba1f2b
branch: 3.5
parent: 97027:b30fc1de006c
parent: 97029:13af5c3414b5
user: Robert Collins <rbtcollins at hp.com>
date: Fri Jul 24 04:10:27 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