TG-103 edit tox and manage

This commit is contained in:
Quentin Rouland 2017-01-27 04:52:23 +01:00
parent 9d89435132
commit 143fdeefac
3 changed files with 4 additions and 2 deletions

View File

@ -76,6 +76,8 @@ manager.add_command('checkdb', CheckDB())
class RunTests(Command):
"""Seed the db """
def run(self):
if not args.test:
raise Exception("Les tests doivent etre lancés en config de test")
test_loader = unittest.defaultTestLoader
test_runner = unittest.TextTestRunner()
test_suite = test_loader.discover('tests')

View File

@ -4,4 +4,4 @@ flask-sqlalchemy < 2.2
flask-restful < 0.4
mysqlclient < 1.4
pdfjinja < 1.1
python-pypdf2 < 1.27
pypdf2

View File

@ -6,7 +6,7 @@ exclude = .git, app/static, app/templates, tox.ini
skipsdist = True
[testenv]
commands = coverage run --source app/api,app/tools manage.py -t runtests
commands = coverage run --source app/api,app/tools --omit app/api/exampleapi.py manage.py -t runtests
coverage report -m
coverage xml
coverage html