Adjust examples and docs.

This commit is contained in:
Aldo Cortesi 2012-08-23 12:37:02 +12:00
parent d758409b76
commit b78a3817cd
3 changed files with 44 additions and 36 deletions

View File

@ -1,12 +1,11 @@
import requests import requests
from libpathod import test from libpathod import test
class Test: def test_simple():
""" """
Testing the requests module with Testing the requests module with
a pathod context manager. a pathod context manager.
""" """
def test_simple(self):
# Start pathod in a separate thread # Start pathod in a separate thread
with test.Daemon() as d: with test.Daemon() as d:
# Get a URL for a pathod spec # Get a URL for a pathod spec

View File

@ -4,22 +4,32 @@
<section> <section>
<div class="page-header"> <div class="page-header">
<h1> <h1>
where how
<small>to get the code.</small> <small>to get it.</small>
</h1> </h1>
</div> </div>
<h3>git clone git://github.com/cortesi/pathod.git</h3> <p>The easiest way to install pathod is to use pip:</p>
<pre>pip install pathod</pre>
<p> You can find the project source on GitHub: </p>
<div style="margin-top: 20px; margin-bottom: 20px">
<a class="btn btn-primary btn-large" href="https://github.com/cortesi/pathod">github.com/cortesi/pathod</a>
</div>
<p>Please also use the <a
href="https://github.com/cortesi/pathod/issues">github issue tracker</a> to
report bugs. </p>
<p>Please use the <a href="http://github.com/cortesi/pathod/issues">github
issue tracker</a> to report bugs. </p>
</section> </section>
<section> <section>
<div class="page-header"> <div class="page-header">
<h1> <h1>
why why
<small>this was written.</small> <small>this it written.</small>
</h1> </h1>
</div> </div>

View File

@ -1,12 +1,11 @@
<div class="highlight"><pre><span class="kn">import</span> <span class="nn">requests</span> <div class="highlight"><pre><span class="kn">import</span> <span class="nn">requests</span>
<span class="kn">from</span> <span class="nn">libpathod</span> <span class="kn">import</span> <span class="n">test</span> <span class="kn">from</span> <span class="nn">libpathod</span> <span class="kn">import</span> <span class="n">test</span>
<span class="k">class</span> <span class="nc">Test</span><span class="p">:</span> <span class="k">def</span> <span class="nf">test_simple</span><span class="p">():</span>
<span class="sd">&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Testing the requests module with</span> <span class="sd"> Testing the requests module with</span>
<span class="sd"> a pathod context manager.</span> <span class="sd"> a pathod context manager.</span>
<span class="sd"> &quot;&quot;&quot;</span> <span class="sd"> &quot;&quot;&quot;</span>
<span class="k">def</span> <span class="nf">test_simple</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="c"># Start pathod in a separate thread</span> <span class="c"># Start pathod in a separate thread</span>
<span class="k">with</span> <span class="n">test</span><span class="o">.</span><span class="n">Daemon</span><span class="p">()</span> <span class="k">as</span> <span class="n">d</span><span class="p">:</span> <span class="k">with</span> <span class="n">test</span><span class="o">.</span><span class="n">Daemon</span><span class="p">()</span> <span class="k">as</span> <span class="n">d</span><span class="p">:</span>
<span class="c"># Get a URL for a pathod spec</span> <span class="c"># Get a URL for a pathod spec</span>