diff --git a/fabfile.py b/fabfile.py index 3321cb16..de2cf7bb 100644 --- a/fabfile.py +++ b/fabfile.py @@ -1,21 +1,51 @@ -from fabric.api import local, settings +from fabric.api import execute, local, settings, task +@task +def docs(): + local('make -C docs/ html') + + +@task +def autodocs(): + auto(docs) + + +@task def test(path=None): path = path or 'tests/' local('nosetests ' + path) +@task def autotest(path=None): + auto(test, path=path) + + +@task +def coverage(path=None): + path = path or 'tests/' + local( + 'nosetests --with-coverage --cover-package=mopidy ' + '--cover-branches --cover-html ' + path) + + +@task +def autocoverage(path=None): + auto(coverage, path=path) + + +def auto(task, *args, **kwargs): while True: local('clear') with settings(warn_only=True): - test(path) + execute(task, *args, **kwargs) local( 'inotifywait -q -e create -e modify -e delete ' - '--exclude ".*\.(pyc|sw.)" -r mopidy/ tests/') + '--exclude ".*\.(pyc|sw.)" -r docs/ mopidy/ tests/') +@task def update_authors(): # Keep authors in the order of appearance and use awk to filter out dupes local( diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index bce0a6e2..00000000 --- a/setup.cfg +++ /dev/null @@ -1,6 +0,0 @@ -[nosetests] -verbosity = 1 -#with-coverage = 1 -cover-package = mopidy -cover-inclusive = 1 -cover-html = 1