Преглед изворни кода

Make coverage report works with python3

Matthew Wang пре 11 година
родитељ
комит
6639908183
2 измењених фајлова са 10 додато и 12 уклоњено
  1. 1
    1
      .travis.yml
  2. 9
    11
      Makefile

+ 1
- 1
.travis.yml Прегледај датотеку

@@ -15,4 +15,4 @@ install:
15 15
     - python setup.py --quiet install
16 16
 
17 17
 script:
18
-    - make test cov
18
+    - make test

+ 9
- 11
Makefile Прегледај датотеку

@@ -4,21 +4,23 @@ 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 cov profile profile3
7
+	test test3 cov cov3 reg reg3 profile profile3
8 8
 
9 9
 dogfood:
10 10
 	./cdiff.py
11 11
 	git diff | ./cdiff.py -s
12 12
 
13
-test: unit reg
13
+test: cov reg
14 14
 
15
-test3: unit3 reg3
15
+test3: cov reg3
16 16
 
17
-unit:
18
-	tests/test_cdiff.py
17
+cov:
18
+	coverage run tests/test_cdiff.py
19
+	coverage report --include cdiff.py --show-missing
19 20
 
20
-unit3:
21
-	python3 tests/test_cdiff.py
21
+cov3:
22
+	python3 `which coverage` run tests/test_cdiff.py
23
+	python3 `which coverage` report --include cdiff.py --show-missing
22 24
 
23 25
 reg:
24 26
 	tests/regression.sh
@@ -26,10 +28,6 @@ reg:
26 28
 reg3:
27 29
 	PYTHON=python3 tests/regression.sh
28 30
 
29
-cov:
30
-	coverage run tests/test_cdiff.py
31
-	coverage report --include cdiff.py --show-missing
32
-
33 31
 profile:
34 32
 	tests/profile.sh profile.tmp
35 33