]> granicus.if.org Git - python/commitdiff
Add versionchanged information for mock_open.
authorRobert Collins <rbtcollins@hp.com>
Thu, 23 Jul 2015 16:10:27 +0000 (04:10 +1200)
committerRobert Collins <rbtcollins@hp.com>
Thu, 23 Jul 2015 16:10:27 +0000 (04:10 +1200)
1  2 
Doc/library/unittest.mock.rst

index f31beea8cc86f6386e8ea9b6c818007427295f83,13b3133f1e8abf83a32014de790ef7b37dadd213..0f621c844da7dec1e3289cbbb6d1268e4f39b5a2
@@@ -2043,6 -2001,14 +2043,14 @@@ mock_ope
      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.4
+    .. 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::