Merge "Make extract_messages quiet in pep8 test"
This commit is contained in:
commit
c0cb55046e
@ -37,11 +37,13 @@ class Command(BaseCommand):
|
||||
"polluting the source code"))
|
||||
|
||||
def handle(self, *args, **options):
|
||||
cmd = ('python setup.py extract_messages -F babel-{domain}.cfg '
|
||||
cmd = ('python setup.py {quiet} extract_messages '
|
||||
'-F babel-{domain}.cfg '
|
||||
'-o {module}/locale/{domain}.pot')
|
||||
distribution = Distribution()
|
||||
distribution.parse_config_files(distribution.find_config_files())
|
||||
|
||||
quiet = '-q' if int(options['verbosity']) == 0 else ''
|
||||
if options['check_only']:
|
||||
cmd += " ; rm {module}/locale/{domain}.pot"
|
||||
|
||||
@ -53,5 +55,5 @@ class Command(BaseCommand):
|
||||
with open(potfile, 'wb') as f:
|
||||
f.write(b'')
|
||||
|
||||
call(cmd.format(module=module, domain=domain, potfile=potfile),
|
||||
shell=True)
|
||||
call(cmd.format(module=module, domain=domain, potfile=potfile,
|
||||
quiet=quiet), shell=True)
|
||||
|
2
tox.ini
2
tox.ini
@ -56,7 +56,7 @@ commands = bash {toxinidir}/tools/unit_tests.sh {envpython} {toxinidir} {posargs
|
||||
[testenv:pep8]
|
||||
usedevelop = True
|
||||
commands =
|
||||
{envpython} {toxinidir}/manage.py extract_messages --check-only
|
||||
{envpython} {toxinidir}/manage.py extract_messages --verbosity 0 --check-only
|
||||
flake8
|
||||
|
||||
[testenv:cover]
|
||||
|
Loading…
x
Reference in New Issue
Block a user