Browse Source

Make coverage report works with python3

Matthew Wang 12 years ago
parent
commit
6639908183
2 changed files with 10 additions and 12 deletions
  1. 1
    1
      .travis.yml
  2. 9
    11
      Makefile

+ 1
- 1
.travis.yml View File

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

+ 9
- 11
Makefile View File

4
 PYPI = https://pypi.python.org/pypi
4
 PYPI = https://pypi.python.org/pypi
5
 
5
 
6
 .PHONY: dogfood clean build dist-test dist \
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
 dogfood:
9
 dogfood:
10
 	./cdiff.py
10
 	./cdiff.py
11
 	git diff | ./cdiff.py -s
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
 reg:
25
 reg:
24
 	tests/regression.sh
26
 	tests/regression.sh
26
 reg3:
28
 reg3:
27
 	PYTHON=python3 tests/regression.sh
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
 profile:
31
 profile:
34
 	tests/profile.sh profile.tmp
32
 	tests/profile.sh profile.tmp
35
 
33