diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-10-13 20:09:14 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-10-13 20:09:14 (GMT) |
commit | bfdcd436f0410e2b3eb34ce4fd7411488d3f13fb (patch) | |
tree | 92e02b473c00b7dc9cbe908681723079a3466c7f /Doc/library/unittest.mock.rst | |
parent | 24201d497cf23d399cceadad8058261c13ae536f (diff) | |
download | cpython-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.rst | 8 |
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:: |