Skip to content

Commit

Permalink
add rst note boxes
Browse files Browse the repository at this point in the history
  • Loading branch information
swiesend committed Jan 17, 2019
1 parent e03f1bc commit caed591
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,28 @@ tocolib

|build-status| |docs|

The ``tocolib`` contains utility functions to make your life as developer easier.
The ``tocolib`` contains utility functions for common use cases to make your life as developer easier.

For more information see: `DESCRIPTION <https://github.com/tocoli/tocolib/blob/master/DESCRIPTION.rst>`_
For more information on the functionality included see the `description <https://github.com/tocoli/tocolib/blob/master/DESCRIPTION.rst>`_ file or
vist the `documentation <https://tocolib.readthedocs.io/en/latest/?badge=latest>`_.

For latest changes see the `changelog <https://github.com/tocoli/tocolib/blob/master/CHANGELOG.md>`_.

Install
=======

System Dependencies
-------------------

Make sure that ``pip2`` or ``pip3`` is globally available.
Make sure that ``pip2`` or ``pip3`` is globally available. For example, if you like to use the library under ubuntu do:

For example, if you like to use the library under ubuntu do:
For Python 2 install ``pip2``:

For Python 2 install ``pip2``::
sudo apt-get install python-pip
``sudo apt-get install python-pip``

For Python 3 install ``pip3``:
sudo apt-get install python3-pip

``sudo apt-get install python3-pip``

Library Dependencies
--------------------
Expand All @@ -30,13 +33,16 @@ Install all runtime dependencies (locally) into the virtual environment.

.. note:: Make sure you have ``virtualenv`` installed globally on your system.

For Python 2::

For Python 2:
::

virtualenv -p /usr/bin/python2.7 py27
source py27/bin/activate
pip install -r requirements.txt

For Python 3::
For Python 3:
::

virtualenv -p /usr/bin/python3.6 py36
source py36/bin/activate
Expand All @@ -55,25 +61,28 @@ Testing

Run all tests with the built-in test discovery or with ``pytest``.

.. note:: Make sure you have ``pytest`` installed with ``pip install pytest``.
.. note:: Make sure you have ``pytest`` installed. E.g.: with ``pip install pytest``.

built-in testing:

``python -m unittest discover -s './tests' -p 'test_*.py'``

with ``pytest``:
``pytest tests``
or with ``pytest``:

If you want to test just some parts of the library, then one can invoke more specficic commands.
``pytest tests``

Replace ``test_module``, ``TestClass``, ``test_function`` by the actual name.
If you want to test just some parts of the library, then one can invoke more specficic commands. Replace ``test_module``, ``TestClass``, ``test_function`` respectivly by the actual name.

run a test suite:

``python -m unittest tests.test_module``

run a test class:

``python -m unittest tests.test_module.TestClass``

run a test function:

``python -m unittest tests.test_module.TestClass.test_function``


Expand Down

0 comments on commit caed591

Please sign in to comment.