Skip to content

Commit e24e7c6

Browse files
committed
Fix coverage report
1 parent fc74f39 commit e24e7c6

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ build/
1515
.venv
1616
__pycache__/
1717
data/marvinMorning_date.txt
18+
.coverage

Makefile

+5-4
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,11 @@ doctest:
142142
.PHONY: coverage
143143
coverage:
144144
@$(call HELPTEXT,$@)
145-
@install -d build/coverage-html
146-
$(ENV) && coverage run --source=. -m unittest discover -b -s tests
147-
$(ENV) && coverage html --directory=build/coverage-html
148-
$(ENV) && coverage report -m
145+
@install -d build/coverage
146+
coverage run --source=. -m unittest discover -b
147+
coverage html --directory=build/coverage
148+
rsync -a build/coverage/ docs/coverage/
149+
coverage report -m
149150

150151

151152

README.md

+19
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,25 @@ Check `main.py` for more details (should be moved to pydoc or other proper docum
2828

2929

3030

31+
Verify unitttest and code coverage
32+
--------------------------
33+
34+
Run the unittests.
35+
36+
```bash
37+
make unittest
38+
```
39+
40+
Run code coverage and create reports.
41+
42+
```bash
43+
make coverage
44+
```
45+
46+
A html report of the code coverage is generated into `build/coverage/index.html`.
47+
48+
49+
3150
History
3251
--------------------------
3352
The python script, `irc2phpbb.py`, is a implementation of an irc bot. The bot can answer

0 commit comments

Comments
 (0)