@@ -8,8 +8,7 @@ variables:
88 python.exe : " python"
99 COVERAGE_FILE : " $(Build.Repository.LocalPath)/.coverage"
1010 COVERAGE_PROCESS_START : " $(Build.Repository.LocalPath)/.coveragerc"
11- _PYTEST_TOX_COVERAGE_RUN : " coverage run -m"
12- _PYTEST_TOX_EXTRA_DEP : " coverage-enable-subprocess"
11+ PYTEST_COVERAGE : ' 0'
1312
1413jobs :
1514
@@ -21,47 +20,54 @@ jobs:
2120 py27 :
2221 python.version : ' 2.7'
2322 tox.env : ' py27'
23+ PYTEST_COVERAGE : ' 1'
2424 py27-xdist :
2525 python.version : ' 2.7'
2626 tox.env : ' py27-xdist'
27+ PYTEST_COVERAGE : ' 1'
2728 py27-numpy/nobyte :
2829 python.version : ' 2.7'
2930 tox.env : ' py27-numpy,py27-nobyte'
31+ PYTEST_COVERAGE : ' 1'
3032 py27-trial :
3133 python.version : ' 2.7'
3234 tox.env : ' py27-trial'
3335 python.needs_vc : True
36+ PYTEST_COVERAGE : ' 1'
3437 py27-pluggymaster-xdist :
3538 python.version : ' 2.7'
3639 tox.env : ' py27-pluggymaster-xdist'
3740 pypy :
3841 python.version : ' pypy'
3942 tox.env : ' pypy'
4043 python.exe : ' pypy'
41- _PYTEST_TOX_COVERAGE_RUN : " "
42- _PYTEST_TOX_EXTRA_DEP : " "
43- PYTEST_NO_COVERAGE : " 1"
4444 py34 :
4545 python.version : ' 3.4'
4646 tox.env : ' py34'
47+ PYTEST_COVERAGE : ' 1'
4748 py35 :
4849 python.version : ' 3.5'
4950 tox.env : ' py35'
51+ PYTEST_COVERAGE : ' 1'
5052 py36 :
5153 python.version : ' 3.6'
5254 tox.env : ' py36'
55+ PYTEST_COVERAGE : ' 1'
5356 py37 :
5457 python.version : ' 3.7'
5558 tox.env : ' py37'
59+ PYTEST_COVERAGE : ' 1'
5660 py37-linting/docs/doctesting :
5761 python.version : ' 3.7'
5862 tox.env : ' linting,docs,doctesting'
5963 py37-xdist :
6064 python.version : ' 3.7'
6165 tox.env : ' py37-xdist'
66+ PYTEST_COVERAGE : ' 1'
6267 py37-trial/numpy :
6368 python.version : ' 3.7'
6469 tox.env : ' py37-trial,py37-numpy'
70+ PYTEST_COVERAGE : ' 1'
6571 py37-pluggymaster-xdist :
6672 python.version : ' 3.7'
6773 tox.env : ' py37-pluggymaster-xdist'
98104 - script : $(python.exe) -m pip install --upgrade pip && $(python.exe) -m pip install tox
99105 displayName : ' Install tox'
100106
101- - script : $(python.exe) -m tox -e $(tox.env)
107+ - script : |
108+ call scripts/setup-coverage-vars.bat || goto :eof
109+ $(python.exe) -m tox -e $(tox.env)
102110 displayName: 'Run tests'
103111
104112 - task : PublishTestResults@2
@@ -109,5 +117,6 @@ jobs:
109117
110118 - script : call scripts\upload-coverage.bat
111119 displayName : ' Upload coverage'
120+ condition : eq(variables['PYTEST_COVERAGE'], '1')
112121 env :
113122 CODECOV_TOKEN : $(CODECOV_TOKEN)
0 commit comments