Skip to content

Commit

Permalink
improved docs
Browse files Browse the repository at this point in the history
  • Loading branch information
shyal committed Dec 5, 2016
1 parent 562dba8 commit 9029038
Show file tree
Hide file tree
Showing 24 changed files with 151 additions and 492 deletions.
6 changes: 5 additions & 1 deletion docs/source/basic.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _basic
.. basic
=====
basic
Expand Down Expand Up @@ -40,3 +40,7 @@ Print the json from our get request. This time the data comes from the store.
>>> print(requests.get("http://ip.jsontest.com/myip").json())


Requests.db
-----------

You may have noticed this created a ``requests.db`` inside your current directory. This is a boltdb database, holding our requests, and their responses.
2 changes: 1 addition & 1 deletion docs/source/delays.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _delays
.. delays
======
delays
Expand Down
65 changes: 0 additions & 65 deletions docs/source/examples.rst

This file was deleted.

30 changes: 30 additions & 0 deletions docs/source/hoverpy.tests.modify.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
hoverpy.tests.modify package
============================

Submodules
----------

hoverpy.tests.modify.modify module
----------------------------------

.. automodule:: hoverpy.tests.modify.modify
:members:
:undoc-members:
:show-inheritance:

hoverpy.tests.modify.test_modify module
---------------------------------------

.. automodule:: hoverpy.tests.modify.test_modify
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: hoverpy.tests.modify
:members:
:undoc-members:
:show-inheritance:
46 changes: 46 additions & 0 deletions docs/source/hoverpy.tests.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
hoverpy.tests package
=====================

Subpackages
-----------

.. toctree::

hoverpy.tests.modify
hoverpy.tests.templates

Submodules
----------

hoverpy.tests.basetestcase module
---------------------------------

.. automodule:: hoverpy.tests.basetestcase
:members:
:undoc-members:
:show-inheritance:

hoverpy.tests.run module
------------------------

.. automodule:: hoverpy.tests.run
:members:
:undoc-members:
:show-inheritance:

hoverpy.tests.test_virtualisation module
----------------------------------------

.. automodule:: hoverpy.tests.test_virtualisation
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: hoverpy.tests
:members:
:undoc-members:
:show-inheritance:
22 changes: 22 additions & 0 deletions docs/source/hoverpy.tests.templates.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
hoverpy.tests.templates package
===============================

Submodules
----------

hoverpy.tests.templates.test_templates module
---------------------------------------------

.. automodule:: hoverpy.tests.templates.test_templates
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: hoverpy.tests.templates
:members:
:undoc-members:
:show-inheritance:
2 changes: 1 addition & 1 deletion docs/source/modify.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _modify
.. modify
======
modify
Expand Down
2 changes: 1 addition & 1 deletion docs/source/readthedocs.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _readthedocs
.. readthedocs
===========
readthedocs
Expand Down
12 changes: 10 additions & 2 deletions docs/source/unittesting.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _unittesting
.. unittesting
===========
unittesting
Expand Down Expand Up @@ -46,4 +46,12 @@ Let's run our hoverpy testcase if the script is invoked directly
>>> unittest.main()


<hr> Now the correct way of launching this script the first time is: <br><br> `$ env HOVERPY_CAPTURE=true python examples/unittesting/unittesting.py`<br><br> which sets HoverPy in capture mode, and creates our all important `requests.db`. This process may take around 10 seconds depending on your internet speed. Now when we rerun our unit tests, we're always running against the data we captured in `requests.db`.<br><br> `$ python examples/unittesting/unittesting.py`<br><br> This time we are done in around 100ms! Not to mention: no more unnecessary breakages.
Now the correct way of launching this script the first time is:

``$ env HOVERPY_CAPTURE=true python examples/unittesting/unittesting.py``

which sets HoverPy in capture mode, and creates our all important ``requests.db``. This process may take around 10 seconds depending on your internet speed. Now when we rerun our unit tests, we're always running against the data we captured in ``requests.db``.

``$ python examples/unittesting/unittesting.py``

This time we are done in around 100ms! Not to mention: no more unnecessary breakages.
2 changes: 1 addition & 1 deletion docs/source/urllib2eg.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _urllib2eg
.. urllib2eg
=========
urllib2eg
Expand Down
2 changes: 1 addition & 1 deletion docs/source/urllib3eg.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _urllib3eg
.. urllib3eg
=========
urllib3eg
Expand Down
4 changes: 0 additions & 4 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,4 @@ I don't know about you, but for me the best way of getting into things is by try
urllib3eg


requests.db
-----------

You may have noticed this created a ``requests.db`` inside your current directory. This is a boltdb database, holding our requests, and their responses.

8 changes: 8 additions & 0 deletions examples/basic/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@
# print the json from our get request. This time the data comes from the
# store.
print(requests.get("http://ip.jsontest.com/myip").json())


# requests.db<br>
# -----------<br>
# <br>
# You may have noticed this created a ``requests.db`` inside your current
# directory. This is a boltdb database, holding our requests, and their
# responses.
42 changes: 0 additions & 42 deletions examples/basic/basic.rst

This file was deleted.

89 changes: 0 additions & 89 deletions examples/delays/delays.rst

This file was deleted.

0 comments on commit 9029038

Please sign in to comment.