Skip to content

Commit e5677c3

Browse files
committed
Update coverage, use the new run.patch setting
1 parent 53fb451 commit e5677c3

3 files changed

Lines changed: 116 additions & 72 deletions

File tree

Justfile

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
python := ""
2+
covcleanup := "true"
23

34
lint:
45
uv run -p python3.13 --group lint ruff check src/ tests bench
@@ -7,9 +8,30 @@ lint:
78
test *args="-x --ff -n auto tests":
89
uv run {{ if python != '' { '-p ' + python } else { '' } }} --all-extras --group test pytest {{args}}
910

11+
testall:
12+
just python=python3.9 test
13+
just python=python3.10 test
14+
just python=python3.11 test
15+
just python=python3.12 test
16+
just python=python3.13 test
17+
just python=pypy3.9 test
18+
1019
cov *args="-x --ff -n auto tests":
11-
@uv run {{ if python != '' { '-p ' + python } else { '' } }} python -c 'import pathlib, site; pathlib.Path(f"{site.getsitepackages()[0]}/cov.pth").write_text("import coverage; coverage.process_startup()")'
12-
COVERAGE_PROCESS_START={{justfile_directory()}}/pyproject.toml uv run {{ if python != '' { '-p ' + python } else { '' } }} --all-extras --group test coverage run -m pytest {{args}}
20+
uv run {{ if python != '' { '-p ' + python } else { '' } }} --all-extras --group test coverage run -m pytest {{args}}
21+
{{ if covcleanup == "true" { "uv run coverage combine" } else { "" } }}
22+
{{ if covcleanup == "true" { "uv run coverage report" } else { "" } }}
23+
{{ if covcleanup == "true" { "@rm .coverage*" } else { "" } }}
24+
25+
covall:
26+
just python=python3.9 covcleanup=false cov
27+
just python=python3.10 covcleanup=false cov
28+
just python=python3.11 covcleanup=false cov
29+
just python=python3.12 covcleanup=false cov
30+
just python=python3.13 covcleanup=false cov
31+
just python=pypy3.9 covcleanup=false cov
32+
uv run coverage combine
33+
uv run coverage report
34+
@rm .coverage*
1335

1436
bench-cmp:
1537
uv run pytest bench --benchmark-compare

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ addopts = "-l --benchmark-sort=fullname --benchmark-warmup=true --benchmark-warm
103103
parallel = true
104104
source_pkgs = ["cattrs", "tests"]
105105
core = "sysmon"
106+
patch = ["subprocess"]
106107

107108
[tool.coverage.report]
108109
show_missing = true

0 commit comments

Comments
 (0)