File: run_coverage.py

package info (click to toggle)
cura 5.0.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 122,888 kB
  • sloc: python: 44,572; sh: 81; xml: 32; makefile: 16
file content (22 lines) | stat: -rw-r--r-- 464 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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)