Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanv authored Aug 19, 2023
1 parent 9fa421c commit 31626da
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions spin/cmds/meson.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def _get_configured_command(command_name):
@click.option(
"--coverage",
is_flag=True,
help="Report coverage of project code. HTML output goes under build/coverage",
help="Generate coverage report of executed tests. HTML output goes under `build/coverage`.",
)
@click.pass_context
def test(ctx, pytest_args, coverage=False):
Expand Down Expand Up @@ -243,12 +243,11 @@ def test(ctx, pytest_args, coverage=False):

if coverage:
coverage_dir = os.path.join(os.getcwd(), "build/coverage/")
print(f"Removing `{coverage_dir}`")
if os.path.isdir(coverage_dir):
print(f"Removing `{coverage_dir}`")
shutil.rmtree(coverage_dir)
os.makedirs(coverage_dir)
pytest_args = [
*pytest_args,
pytest_args = pytest_args + [
f"--cov-report=html:{coverage_dir}",
f"--cov={package}",
]
Expand Down

0 comments on commit 31626da

Please sign in to comment.