mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 23:46:22 -06:00
Add convenience script for running complete coverage
This commit is contained in:
parent
9b45b56e61
commit
87e0b8629a
6 changed files with 41 additions and 5 deletions
22
run_coverage.py
Normal file
22
run_coverage.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
import pytest
|
||||
from pathlib import Path
|
||||
|
||||
# Small helper script to run the coverage of main code & all plugins
|
||||
|
||||
path = Path("plugins")
|
||||
args = ["--cov" ,"cura" , "--cov-report", "html"]
|
||||
all_paths = []
|
||||
for p in path.glob('**/*'):
|
||||
if p.is_dir():
|
||||
if p.name in ["__pycache__", "tests"]:
|
||||
continue
|
||||
args.append("--cov")
|
||||
args.append(str(p))
|
||||
all_paths.append(str(p))
|
||||
|
||||
for path in all_paths:
|
||||
args.append(path)
|
||||
args.append(".")
|
||||
args.append("-x")
|
||||
pytest.main(args)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue