summaryrefslogtreecommitdiffstats
path: root/Doc/library/unittest.mock.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-10-13 20:09:14 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-10-13 20:09:14 (GMT)
commitbfdcd436f0410e2b3eb34ce4fd7411488d3f13fb (patch)
tree92e02b473c00b7dc9cbe908681723079a3466c7f /Doc/library/unittest.mock.rst
parent24201d497cf23d399cceadad8058261c13ae536f (diff)
downloadcpython-bfdcd436f0410e2b3eb34ce4fd7411488d3f13fb.zip
cpython-bfdcd436f0410e2b3eb34ce4fd7411488d3f13fb.tar.gz
cpython-bfdcd436f0410e2b3eb34ce4fd7411488d3f13fb.tar.bz2
Issue #18758: Fixed and improved cross-references.
Diffstat (limited to 'Doc/library/unittest.mock.rst')
-rw-r--r--Doc/library/unittest.mock.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst
index 6f3f693..9494861 100644
--- a/Doc/library/unittest.mock.rst
+++ b/Doc/library/unittest.mock.rst
@@ -210,8 +210,8 @@ the `new_callable` argument to `patch`.
Accessing any attribute not in this list will raise an `AttributeError`.
If `spec` is an object (rather than a list of strings) then
- :attr:`__class__` returns the class of the spec object. This allows mocks
- to pass `isinstance` tests.
+ :attr:`~instance.__class__` returns the class of the spec object. This
+ allows mocks to pass `isinstance` tests.
* `spec_set`: A stricter variant of `spec`. If used, attempting to *set*
or get an attribute on the mock that isn't on the object passed as
@@ -1969,8 +1969,8 @@ mock_open
default) then a `MagicMock` will be created for you, with the API limited
to methods or attributes available on standard file handles.
- `read_data` is a string for the `read` method of the file handle to return.
- This is an empty string by default.
+ `read_data` is a string for the `~io.IOBase.read` method of the file handle
+ to return. This is an empty string by default.
Using `open` as a context manager is a great way to ensure your file handles
are closed properly and is becoming common::