ソースを参照

Report coverage

Matthew Wang 11 年 前
コミット
0e2020eac2
共有3 個のファイルを変更した9 個の追加4 個の削除を含む
  1. 1
    0
      .gitignore
  2. 2
    2
      .travis.yml
  3. 6
    2
      Makefile

+ 1
- 0
.gitignore ファイルの表示

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

+ 2
- 2
.travis.yml ファイルの表示

@@ -9,7 +9,7 @@ python:
9 9
     - "pypy"
10 10
 
11 11
 install:
12
-    - python setup.py install
12
+    - python setup.py --quiet install
13 13
 
14 14
 script:
15
-    - make test
15
+    - make test cov

+ 6
- 2
Makefile ファイルの表示

@@ -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 unit unit3 reg reg3 profile profile3
7
+	test test3 unit unit3 reg reg3 cov profile profile3
8 8
 
9 9
 dogfood:
10 10
 	./cdiff.py
@@ -26,6 +26,10 @@ reg:
26 26
 reg3:
27 27
 	PYTHON=python3 tests/regression.sh
28 28
 
29
+cov:
30
+	coverage run tests/test_cdiff.py
31
+	coverage report --include cdiff.py --show-missing
32
+
29 33
 profile:
30 34
 	tests/profile.sh profile.tmp
31 35
 
@@ -33,7 +37,7 @@ profile3:
33 37
 	tests/profile.sh profile3.tmp
34 38
 
35 39
 clean:
36
-	rm -f MANIFEST profile*.tmp*
40
+	rm -f MANIFEST profile*.tmp* .coverage
37 41
 	rm -rf build/ cdiff.egg-info/ dist/ __pycache__/
38 42
 
39 43
 build: