Przeglądaj źródła

Add target for coverage html report

Matthew Wang 11 lat temu
rodzic
commit
0e6c439fb3
2 zmienionych plików z 8 dodań i 3 usunięć
  1. 1
    0
      .gitignore
  2. 7
    3
      Makefile

+ 1
- 0
.gitignore Wyświetl plik

@@ -2,6 +2,7 @@
2 2
 *~
3 3
 *.tmp
4 4
 /.coverage
5
+/htmlcov/
5 6
 /MANIFEST
6 7
 /build/
7 8
 /cdiff.egg-info/

+ 7
- 3
Makefile Wyświetl plik

@@ -4,7 +4,7 @@ TESTPYPI = https://testpypi.python.org/pypi
4 4
 PYPI = https://pypi.python.org/pypi
5 5
 
6 6
 .PHONY: dogfood clean build dist-test dist \
7
-	test test3 cov cov3 reg reg3 profile profile3
7
+	test test3 cov cov3 html reg reg3 profile profile3
8 8
 
9 9
 dogfood:
10 10
 	./cdiff.py
@@ -16,11 +16,15 @@ test3: cov3 reg3
16 16
 
17 17
 cov:
18 18
 	coverage run tests/test_cdiff.py
19
-	coverage report --include cdiff.py --show-missing
19
+	coverage report --show-missing
20 20
 
21 21
 cov3:
22 22
 	python3 `which coverage` run tests/test_cdiff.py
23
-	python3 `which coverage` report --include cdiff.py --show-missing
23
+	python3 `which coverage` report --show-missing
24
+
25
+html:
26
+	coverage html
27
+	python -m webbrowser -n "file://$(shell pwd)/htmlcov/index.html"
24 28
 
25 29
 reg:
26 30
 	tests/regression.sh