fab: Add more targets, remove nose config file

This commit is contained in:
Stein Magnus Jodal 2013-06-20 20:02:08 +02:00
parent 9a9eff3c62
commit 04a9c69e48
2 changed files with 33 additions and 9 deletions

36
fabfile.py vendored
View File

@ -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(

View File

@ -1,6 +0,0 @@
[nosetests]
verbosity = 1
#with-coverage = 1
cover-package = mopidy
cover-inclusive = 1
cover-html = 1