diff --git a/.gitignore b/.gitignore index c9b568f7..ffd31496 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ *.pyc *.swp +.coverage +src/ +pip-log.txt diff --git a/README.rst b/README.rst index 27f88980..5a9c38e0 100644 --- a/README.rst +++ b/README.rst @@ -92,3 +92,16 @@ To start mopidy, go to the root of the mopidy project, then simply run:: To stop mopidy, press ``CTRL+C``. + +Running tests +------------- + +To run tests, you need a couple of dependiencies which can be installed using +pip:: + + pip install -r test-requirements.txt + +Then, to run all tests:: + + python tests + diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 00000000..0342fb1c --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,2 @@ +coverage +-e bzr+http://liw.iki.fi/bzr/coverage-test-runner/trunk/#egg=CoverageTestRunner diff --git a/tests/__main__.py b/tests/__main__.py new file mode 100644 index 00000000..ecf863bb --- /dev/null +++ b/tests/__main__.py @@ -0,0 +1,17 @@ +#! /usr/bin/env python + +import os +import sys + +from CoverageTestRunner import CoverageTestRunner + +sys.path.insert(0, + os.path.abspath(os.path.join(os.path.dirname(__file__), '../'))) + +def main(): + r = CoverageTestRunner() + r.add_pair('mopidy/handler.py', 'tests/handlertest.py') + r.run() + +if __name__ == '__main__': + main() diff --git a/tests/handlertest.py b/tests/handlertest.py new file mode 100644 index 00000000..db402ef1 --- /dev/null +++ b/tests/handlertest.py @@ -0,0 +1,8 @@ +import unittest + +class HandlerTest(unittest.TestSuite): + def setUp(): + pass + + def testEverythingOk(): + pass