From c81d1d77bff2cb660d59c8d937b54307c8f49146 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sun, 23 Dec 2012 16:30:59 +0100 Subject: [PATCH] fab: Make 'test' and 'autotest' able to run a subset of the tests --- fabfile.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fabfile.py b/fabfile.py index 267bdc23..370c81be 100644 --- a/fabfile.py +++ b/fabfile.py @@ -1,14 +1,15 @@ from fabric.api import local -def test(): - local('nosetests tests/') +def test(path=None): + path = path or 'tests/' + local('nosetests ' + path) -def autotest(): +def autotest(path=None): while True: local('clear') - test() + test(path) local( 'inotifywait -q -e create -e modify -e delete ' '--exclude ".*\.(pyc|sw.)" -r mopidy/ tests/')