Skip to content

Commit

Permalink
Docs on testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Kura committed Sep 17, 2014
1 parent 165261d commit a9a9d03
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pypi: rtd
rtd:
curl -X POST https://readthedocs.org/build/yarg

test:
test: deps deps-test
nosetests --processes=$(shell grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu) --with-progressive

tox: deps deps-test
Expand Down
3 changes: 2 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Yarg documentation
intro
api-search
api-rss
testing

Changelog
---------
Expand All @@ -72,7 +73,7 @@ Contributors
.. toctree::
:maxdepth: 2

contributors.rst
contributors

Help
----
Expand Down
43 changes: 43 additions & 0 deletions docs/source/testing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Testing
=======

Yarg uses the built-in `unittest` framework for Python and uses `nose` as the
test rig.

Running the tests using the Makefile
------------------------------------

A target has been made available in the project's `Makefile` for running the
test rig, it will install all requirements for testing and run the tests.

.. code-block:: bash
make test
Running the tests without using the Makefile
--------------------------------------------

.. code-block:: bash
pip install -r requirements-test.txt
nosetests --processes=$(shell grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu) --with-progressive
Running the tests with tox/detox
--------------------------------

A `tox` configuration is also provided if you'd like to run the test rig
against all the supported Python versions.

You can do this via the `Makefile` target that will install all requirements
and run the tests:

.. code-block:: bash
make tox
Or you can do it manually:

.. code-block:: bash
pip install -r requirements.txt -r requirements-test.txt
detox

0 comments on commit a9a9d03

Please sign in to comment.