From: Robert Collins Date: Thu, 23 Jul 2015 16:10:27 +0000 (+1200) Subject: Add versionchanged information for mock_open. X-Git-Tag: v3.5.0b4~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=70398398959045a1b617059201ed4fa02b4fa0fa;p=python Add versionchanged information for mock_open. --- 70398398959045a1b617059201ed4fa02b4fa0fa diff --cc Doc/library/unittest.mock.rst index f31beea8cc,13b3133f1e..0f621c844d --- a/Doc/library/unittest.mock.rst +++ b/Doc/library/unittest.mock.rst @@@ -2043,6 -2001,14 +2043,14 @@@ mock_ope is insufficient, one of the in-memory filesystem packages on `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.4.4 ++ .. 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::