Skip to content

Commit 56afafd

Browse files
committed
more coverage
1 parent a5b47b4 commit 56afafd

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

howtos/cpython.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,30 @@ And then in the virtual environment:
8080
(env) $ coverage run ./wkech-zf.py -h
8181
```
8282

83+
That'll create a `.coverage` SQLlite DB file. You can generate reports,
84+
either text or, more usefully, html:
85+
86+
```
87+
(env) $ coverage report
88+
Name Stmts Miss Cover
89+
--------------------------------------------------------------------------------
90+
/home/sftcd/code/defo-project-org/zone-factory/ECHLib.py 346 133 62%
91+
/home/sftcd/code/defo-project-org/zone-factory/wkech-zf.py 103 23 78%
92+
--------------------------------------------------------------------------------
93+
TOTAL 449 156 65%
94+
```
95+
96+
For html:
97+
98+
```
99+
(env) $ coverage html
100+
Wrote HTML report to htmlcov/index.html
101+
```
102+
103+
You can then copy the `htmlcov` directory to somewhere viewable using a browser
104+
to see which lines of code were executed and which still need a test case.
105+
106+
83107

84108
## Code changes
85109

0 commit comments

Comments
 (0)