diff options
author | Michael Foord <michael@voidspace.org.uk> | 2012-04-13 19:51:20 (GMT) |
---|---|---|
committer | Michael Foord <michael@voidspace.org.uk> | 2012-04-13 19:51:20 (GMT) |
commit | 0682a0c0a925c52bf4d8d3030681b82796bdc6e2 (patch) | |
tree | 85a9641ea5b1383282ac196a8068bea31825c867 /Lib/unittest/mock.py | |
parent | 656319e58d80478c7aa2a783606f0b50053529ae (diff) | |
download | cpython-0682a0c0a925c52bf4d8d3030681b82796bdc6e2.zip cpython-0682a0c0a925c52bf4d8d3030681b82796bdc6e2.tar.gz cpython-0682a0c0a925c52bf4d8d3030681b82796bdc6e2.tar.bz2 |
Minor docstring / docs corrections for unittest.mock
Diffstat (limited to 'Lib/unittest/mock.py')
-rw-r--r-- | Lib/unittest/mock.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py index 04eba91..8cedcb4 100644 --- a/Lib/unittest/mock.py +++ b/Lib/unittest/mock.py @@ -941,12 +941,12 @@ class Mock(CallableMixin, NonCallableMock): this is a new Mock (created on first access). See the `return_value` attribute. - * `wraps`: Item for the mock object to wrap. If `wraps` is not None - then calling the Mock will pass the call through to the wrapped object - (returning the real result and ignoring `return_value`). Attribute - access on the mock will return a Mock object that wraps the corresponding - attribute of the wrapped object (so attempting to access an attribute that - doesn't exist will raise an `AttributeError`). + * `wraps`: Item for the mock object to wrap. If `wraps` is not None then + calling the Mock will pass the call through to the wrapped object + (returning the real result). Attribute access on the mock will return a + Mock object that wraps the corresponding attribute of the wrapped object + (so attempting to access an attribute that doesn't exist will raise an + `AttributeError`). If the mock has an explicit `return_value` set then calls are not passed to the wrapped object and the `return_value` is returned instead. |