| commit 57: | 9a7dbecc77c3 |
| parent 56: | 4302c38a8b1a |
| branch: | trunk |
documentation fixes
Changed (Δ296 bytes):
raw changeset »
docs/index.rst (10 lines added, 4 lines removed)
Up to file-list docs/index.rst:
| … | … | @@ -89,14 +89,20 @@ start with ``mock_``, while the construc |
89 |
89 |
essence, this function will be the *real* implementation of the |
90 |
90 |
method. |
91 |
91 |
|
92 |
`` |
|
92 |
``raises``: |
|
93 |
93 |
An exception (instance or class) that will be raised when this |
94 |
94 |
object is called. |
95 |
95 |
|
96 |
``tracker``: |
|
97 |
An object which is notified every time the mock object is called or |
|
98 |
an attribute is set on it (assuming ``show_attrs`` is ``True``); |
|
99 |
defaults to a ``Printer`` to stdout. ``TraceTracker`` can instead be |
|
100 |
useful for non-doctest tests. Pass ``None`` to disable this behavior. |
|
101 |
||
96 |
102 |
``show_attrs``: |
97 |
If this is true, everytime a new attribute is set on the mock |
|
98 |
object something will be printed. Otherwise attribute sets are |
|
99 |
|
|
103 |
If this is true, every time a new attribute is set on the mock |
|
104 |
object the tracker will be notified. Otherwise attribute sets are |
|
105 |
silent, and only calls trigger notification. |
|
100 |
106 |
|
101 |
107 |
So to create an object that always raises ValueError, do:: |
102 |
108 |
