Add framework for testing
This commit is contained in:
parent
69cee7bd08
commit
47d0949666
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1,5 @@
|
||||
*.pyc
|
||||
*.swp
|
||||
.coverage
|
||||
src/
|
||||
pip-log.txt
|
||||
|
||||
13
README.rst
13
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
|
||||
|
||||
|
||||
2
test-requirements.txt
Normal file
2
test-requirements.txt
Normal file
@ -0,0 +1,2 @@
|
||||
coverage
|
||||
-e bzr+http://liw.iki.fi/bzr/coverage-test-runner/trunk/#egg=CoverageTestRunner
|
||||
17
tests/__main__.py
Normal file
17
tests/__main__.py
Normal file
@ -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()
|
||||
8
tests/handlertest.py
Normal file
8
tests/handlertest.py
Normal file
@ -0,0 +1,8 @@
|
||||
import unittest
|
||||
|
||||
class HandlerTest(unittest.TestSuite):
|
||||
def setUp():
|
||||
pass
|
||||
|
||||
def testEverythingOk():
|
||||
pass
|
||||
Loading…
Reference in New Issue
Block a user