File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ by looking at the return value of the mocked class.
9999In the example below we have a function `some_function ` that instantiates `Foo `
100100and calls a method on it. The call to `patch ` replaces the class `Foo ` with a
101101mock. The `Foo ` instance is the result of calling the mock, so it is configured
102- by modify the mock :attr: `~Mock.return_value `.
102+ by modifying the mock :attr: `~Mock.return_value `.
103103
104104 >>> def some_function ():
105105 ... instance = module.Foo()
Original file line number Diff line number Diff line change @@ -236,10 +236,10 @@ the `new_callable` argument to `patch`.
236236
237237 * `wraps `: Item for the mock object to wrap. If `wraps ` is not None then
238238 calling the Mock will pass the call through to the wrapped object
239- (returning the real result and ignoring ` return_value ` ). Attribute access
240- on the mock will return a Mock object that wraps the corresponding
241- attribute of the wrapped object (so attempting to access an attribute
242- that doesn't exist will raise an `AttributeError `).
239+ (returning the real result). Attribute access on the mock will return a
240+ Mock object that wraps the corresponding attribute of the wrapped
241+ object (so attempting to access an attribute that doesn't exist will
242+ raise an `AttributeError `).
243243
244244 If the mock has an explicit `return_value ` set then calls are not passed
245245 to the wrapped object and the `return_value ` is returned instead.
Original file line number Diff line number Diff line change @@ -941,12 +941,12 @@ class or instance) that acts as the specification for the mock object. If
941941 this is a new Mock (created on first access). See the
942942 `return_value` attribute.
943943
944- * `wraps`: Item for the mock object to wrap. If `wraps` is not None
945- then calling the Mock will pass the call through to the wrapped object
946- (returning the real result and ignoring `return_value` ). Attribute
947- access on the mock will return a Mock object that wraps the corresponding
948- attribute of the wrapped object (so attempting to access an attribute that
949- doesn't exist will raise an `AttributeError`).
944+ * `wraps`: Item for the mock object to wrap. If `wraps` is not None then
945+ calling the Mock will pass the call through to the wrapped object
946+ (returning the real result). Attribute access on the mock will return a
947+ Mock object that wraps the corresponding attribute of the wrapped object
948+ (so attempting to access an attribute that doesn't exist will raise an
949+ `AttributeError`).
950950
951951 If the mock has an explicit `return_value` set then calls are not passed
952952 to the wrapped object and the `return_value` is returned instead.
You can’t perform that action at this time.
0 commit comments