mirror of
https://github.com/axiomatic-systems/Bento4.git
synced 2024-12-04 23:39:34 +00:00
13 lines
481 B
Python
13 lines
481 B
Python
from invoke import task, Collection
|
|
|
|
@task(help = {
|
|
'coverage': "Enable code coverage analysis"
|
|
}, default = True)
|
|
def run(ctx, coverage=False):
|
|
command = "python3 -m pytest Test/Pytest"
|
|
if coverage:
|
|
command = "coverage3 run --source=Source/Python/utils -m pytest Test/Pytest"
|
|
ctx.run(command, env={'PYTHONPATH': 'Source/Python/utils', 'BENTO4_HOME': os.path.abspath(os.path.curdir)})
|
|
if coverage:
|
|
ctx.run("coverage3 html -d coverage_html")
|