TG-103 edit tox and manage
This commit is contained in:
parent
9d89435132
commit
143fdeefac
@ -76,6 +76,8 @@ manager.add_command('checkdb', CheckDB())
|
|||||||
class RunTests(Command):
|
class RunTests(Command):
|
||||||
"""Seed the db """
|
"""Seed the db """
|
||||||
def run(self):
|
def run(self):
|
||||||
|
if not args.test:
|
||||||
|
raise Exception("Les tests doivent etre lancés en config de test")
|
||||||
test_loader = unittest.defaultTestLoader
|
test_loader = unittest.defaultTestLoader
|
||||||
test_runner = unittest.TextTestRunner()
|
test_runner = unittest.TextTestRunner()
|
||||||
test_suite = test_loader.discover('tests')
|
test_suite = test_loader.discover('tests')
|
||||||
|
@ -4,4 +4,4 @@ flask-sqlalchemy < 2.2
|
|||||||
flask-restful < 0.4
|
flask-restful < 0.4
|
||||||
mysqlclient < 1.4
|
mysqlclient < 1.4
|
||||||
pdfjinja < 1.1
|
pdfjinja < 1.1
|
||||||
python-pypdf2 < 1.27
|
pypdf2
|
||||||
|
@ -6,7 +6,7 @@ exclude = .git, app/static, app/templates, tox.ini
|
|||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
[testenv]
|
[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 report -m
|
||||||
coverage xml
|
coverage xml
|
||||||
coverage html
|
coverage html
|
||||||
|
Reference in New Issue
Block a user