mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Fix typo in mock docs.
This commit is contained in:
parent
2c05a2e01b
commit
7ea6f706ac
1 changed files with 2 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
:mod:`unittest.mock` --- mock object library
|
:mod:`unittest.mock` --- mock object library
|
||||||
============================================
|
============================================
|
||||||
|
|
||||||
|
@ -646,7 +647,7 @@ the `new_callable` argument to `patch`.
|
||||||
which have no meaning on a non-callable mock.
|
which have no meaning on a non-callable mock.
|
||||||
|
|
||||||
Mock objects that use a class or an instance as a `spec` or `spec_set` are able
|
Mock objects that use a class or an instance as a `spec` or `spec_set` are able
|
||||||
to pass `isintance` tests:
|
to pass `isinstance` tests:
|
||||||
|
|
||||||
>>> mock = Mock(spec=SomeClass)
|
>>> mock = Mock(spec=SomeClass)
|
||||||
>>> isinstance(mock, SomeClass)
|
>>> isinstance(mock, SomeClass)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue