Skip to content

Commit

Permalink
Merge pull request #28 from gregoil/feature/read_the_docs
Browse files Browse the repository at this point in the history
Feature/read the docs
  • Loading branch information
gregoil committed Dec 22, 2017
2 parents 59bf19a + a14bfae commit 6c9e5c8
Show file tree
Hide file tree
Showing 33 changed files with 828 additions and 1,567 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ instance/

# Sphinx documentation
docs/_build/
docs/api/

# PyBuilder
target/
Expand Down
10 changes: 7 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rotest
Rotest
------
.. image:: https://travis-ci.org/gregoil/rotest.svg?branch=travis_ci
:target: https://travis-ci.org/gregoil/rotest
Expand All @@ -15,7 +15,7 @@ resources. The resources may be DUT (devices under test) or they may help
the test process. The tests look very much like tests written using the
builtin module `unittest`.

Why use rotest?
Why Use Rotest?
===============
- Enabling a great team use resources without interfering each other.
- Easily abstracting automated components in the system.
Expand All @@ -38,12 +38,14 @@ For our example, let's look at an example for a `Calculator` resource:
from rotest.management import base_resource
from rotest.management.models import resource_data
class CalculatorData(resource_data.ResourceData):
class Meta:
app_label = "resources"
ip_address = models.IPAddressField()
class Calculator(base_resource.BaseResource):
DATA_CLASS = CalculatorData
Expand Down Expand Up @@ -79,12 +81,14 @@ Now, an example for a test:
from rotest.core.runner import main
from rotest.core.case import TestCase, request
class SimpleCalculationTest(TestCase):
resources = [request("calculator", Calculator)]
def test_simple_calculation(self):
self.assertEqual(self.calculator.calculate("1+2"), 3)
if __name__ == "__main__":
main(SimpleCalculationTest)
Expand All @@ -95,7 +99,7 @@ parameters for finding the suitable resource.

Following, those are the options exposed when running the test:

.. code-block:: bash
.. code-block:: console
$ python test.py --help
Usage: test.py [options]
Expand Down
66 changes: 0 additions & 66 deletions doc/docsido/__init__.py

This file was deleted.

0 comments on commit 6c9e5c8

Please sign in to comment.