Skip to content

Commit 4c38d4a

Browse files
committed
Introduce coverage
1 parent 2d520f0 commit 4c38d4a

File tree

5 files changed

+106
-2
lines changed

5 files changed

+106
-2
lines changed

.github/workflows/test.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,8 @@ jobs:
2020
- name: Install dependencies
2121
run: uv sync
2222

23-
- name: Run tests
24-
run: uv run -m unittest discover tests
23+
- name: Run tests with coverage
24+
run: uv run -m coverage run -m unittest discover tests
25+
26+
- name: Display coverage report
27+
run: uv run -m coverage report

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ wheels/
1010

1111
# Virtual environments
1212
.venv
13+
14+
.coverage

CONTRIBUTING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,16 @@ Tests support built-in UnitTest framework:
66

77
```bash
88
python -m unittest discover tests
9+
```
10+
11+
Running tests with coverage:
12+
13+
```bash
14+
uv run -m coverage run -m unittest discover tests
15+
```
16+
17+
Display coverage report:
18+
19+
```bash
20+
uv run -m coverage report
921
```

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@ requires-python = ">=3.9"
77
dependencies = [
88
"tqdm>=4.67.1",
99
]
10+
11+
[dependency-groups]
12+
dev = [
13+
"coverage>=7.9.1",
14+
]

0 commit comments

Comments
 (0)