addons-server/fabfile.py

37 строки
934 B
Python
Исходник Обычный вид История

2009-12-05 03:08:59 +03:00
from fabric.api import local
2010-01-26 23:57:26 +03:00
def pylint():
2010-01-27 01:44:12 +03:00
local("cd ..;export DJANGO_SETTINGS_MODULE=zamboni/settings_local;"
2010-02-23 21:19:18 +03:00
"PYTHONPATH=zamboni/apps:zamboni/lib "
"pylint --rcfile zamboni/scripts/pylintrc zamboni ",
2010-01-26 23:57:26 +03:00
capture=False)
def pep8(all=False):
local("git fetch jbalogh")
cmd = ("pep8 --repeat --ignore E221"
" --exclude *.sh,*.html,*.json,*.txt,*.pyc,.DS_Store,README,"
"migrations,sphinxapi.py")
if all:
cmd = cmd + " apps lib"
else:
cmd = cmd + " $(git diff --name-only jbalogh/master|grep py$)"
local(cmd, capture=False)
2010-01-19 23:58:45 +03:00
2010-03-10 02:45:58 +03:00
def test(module=None, pdb=False, failfast=True):
cmd = "python manage.py test"
if module:
cmd += " %s" % module
2010-03-10 02:45:58 +03:00
if failfast and failfast != '0':
cmd += " -x"
cmd += " --noinput --logging-clear-handlers"
if pdb:
cmd += ' --pdb --pdb-failures -s'
local(cmd, capture=False)