diff options
Diffstat (limited to 'apidocs/testtools.monkey.html')
-rw-r--r-- | apidocs/testtools.monkey.html | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/apidocs/testtools.monkey.html b/apidocs/testtools.monkey.html new file mode 100644 index 0000000..90d4263 --- /dev/null +++ b/apidocs/testtools.monkey.html @@ -0,0 +1,95 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "DTD/xhtml1-strict.dtd"> +<html> + <head> + <title>testtools.monkey : API documentation</title> + + <meta content="text/html;charset=utf-8" http-equiv="Content-Type" /> + <link href="bootstrap.min.css" type="text/css" rel="stylesheet" /> + <link href="apidocs.css" type="text/css" rel="stylesheet" /> + </head> + <body> + + <nav class="navbar navbar-default"> + <div class="container"> + <div class="navbar-header"> + <a href="index.html" class="navbar-brand"> + <a href="https://github.com/testing-cabal/testtools">testtools</a> API Documentation + </a> + </div> + </div> + </nav> + + <div class="container"> + + <div class="page-header"> + <h1 class="module"><code>testtools.monkey</code> <small>module documentation</small></h1> + + <span id="partOf"> + Part of <code><a href="testtools.html" class="code">testtools</a></code> + + + </span> + </div> + + <div class="extrasDocstring"> + + </div> + + <div class="moduleDocstring"> + <div>Helpers for monkey-patching Python code.<table class="fieldTable"></table></div> + </div> + + <div id="splitTables"> + <table class="children sortable" id="id89"> + + <tr class="class"> + + <td>Class</td> + <td><a href="testtools.monkey.MonkeyPatcher.html" class="code">MonkeyPatcher</a></td> + <td><span>A set of monkey-patches that can be applied and removed all together.</span></td> + </tr><tr class="function"> + + <td>Function</td> + <td><a href="testtools.monkey.html#patch" class="code">patch</a></td> + <td><span>Set 'obj.attribute' to 'value' and return a callable to restore 'obj'.</span></td> + </tr> +</table> + + + + </div> + + <div id="childList"> + + <div class="function"> + <a name="testtools.monkey.patch"> + + </a> + <a name="patch"> + + </a> + <div class="functionHeader"> + + def + patch(obj, attribute, value): + + </div> + <div class="docstring functionBody"> + + <div><p>Set 'obj.attribute' to 'value' and return a callable to restore 'obj'.</p> +<p>If 'attribute' is not set on 'obj' already, then the returned callable +will delete the attribute when called.</p><table class="fieldTable"><tr class="fieldStart"><td class="fieldName">Parameters</td><td class="fieldArg">obj</td><td>An object to monkey-patch.</td></tr><tr><td></td><td class="fieldArg">attribute</td><td>The name of the attribute to patch.</td></tr><tr><td></td><td class="fieldArg">value</td><td>The value to set 'obj.attribute' to.</td></tr><tr class="fieldStart"><td class="fieldName">Returns</td><td colspan="2">A nullary callable that, when run, will restore 'obj' to its +original state.</td></tr></table></div> + </div> +</div> + + </div> + <address> + <a href="index.html">API Documentation</a> for <a href="https://github.com/testing-cabal/testtools">testtools</a>, generated by <a href="https://github.com/twisted/pydoctor/">pydoctor</a> at 2015-07-01 16:11:28. + </address> + + </div> + </body> +</html>
\ No newline at end of file |