@@ -96,7 +96,7 @@ def test_central(testdir):
96
96
script = testdir .makepyfile (SCRIPT )
97
97
98
98
result = testdir .runpytest ('-v' ,
99
- '--cov=%s' % script .dirpath (),
99
+ '--cov' , '--cov-source =%s' % script .dirpath (),
100
100
'--cov-report=term-missing' ,
101
101
script )
102
102
@@ -112,7 +112,7 @@ def test_no_cov_on_fail(testdir):
112
112
script = testdir .makepyfile (SCRIPT_FAIL )
113
113
114
114
result = testdir .runpytest ('-v' ,
115
- '--cov=%s' % script .dirpath (),
115
+ '--cov' , '--cov-source =%s' % script .dirpath (),
116
116
'--cov-report=term-missing' ,
117
117
'--no-cov-on-fail' ,
118
118
script )
@@ -125,7 +125,7 @@ def test_dist_collocated(testdir):
125
125
script = testdir .makepyfile (SCRIPT )
126
126
127
127
result = testdir .runpytest ('-v' ,
128
- '--cov=%s' % script .dirpath (),
128
+ '--cov' , '--cov-source =%s' % script .dirpath (),
129
129
'--cov-report=term-missing' ,
130
130
'--dist=load' ,
131
131
'--tx=2*popen' ,
@@ -145,7 +145,7 @@ def test_dist_not_collocated(testdir):
145
145
dir2 = testdir .mkdir ('dir2' )
146
146
147
147
result = testdir .runpytest ('-v' ,
148
- '--cov=%s' % script .dirpath (),
148
+ '--cov' , '--cov-source =%s' % script .dirpath (),
149
149
'--cov-report=term-missing' ,
150
150
'--dist=load' ,
151
151
'--tx=popen//chdir=%s' % dir1 ,
@@ -167,7 +167,7 @@ def test_central_subprocess(testdir):
167
167
parent_script = scripts .dirpath ().join ('parent_script.py' )
168
168
169
169
result = testdir .runpytest ('-v' ,
170
- '--cov=%s' % scripts .dirpath (),
170
+ '--cov' , '--cov-source =%s' % scripts .dirpath (),
171
171
'--cov-report=term-missing' ,
172
172
parent_script )
173
173
@@ -185,7 +185,7 @@ def test_dist_subprocess_collocated(testdir):
185
185
parent_script = scripts .dirpath ().join ('parent_script.py' )
186
186
187
187
result = testdir .runpytest ('-v' ,
188
- '--cov=%s' % scripts .dirpath (),
188
+ '--cov' , '--cov-source =%s' % scripts .dirpath (),
189
189
'--cov-report=term-missing' ,
190
190
'--dist=load' ,
191
191
'--tx=2*popen' ,
@@ -209,7 +209,7 @@ def test_dist_subprocess_not_collocated(testdir, tmpdir):
209
209
dir2 = tmpdir .mkdir ('dir2' )
210
210
211
211
result = testdir .runpytest ('-v' ,
212
- '--cov=%s' % scripts .dirpath (),
212
+ '--cov' , '--cov-source =%s' % scripts .dirpath (),
213
213
'--cov-report=term-missing' ,
214
214
'--dist=load' ,
215
215
'--tx=popen//chdir=%s' % dir1 ,
@@ -230,7 +230,7 @@ def test_empty_report(testdir):
230
230
script = testdir .makepyfile (SCRIPT )
231
231
232
232
result = testdir .runpytest ('-v' ,
233
- '--cov=non_existent_module' ,
233
+ '--cov' , '--cov-source =non_existent_module' ,
234
234
'--cov-report=term-missing' ,
235
235
script )
236
236
@@ -253,7 +253,7 @@ def test_dist_missing_data(testdir):
253
253
script = testdir .makepyfile (SCRIPT )
254
254
255
255
result = testdir .runpytest ('-v' ,
256
- '--cov=%s' % script .dirpath (),
256
+ '--cov' , '--cov-source =%s' % script .dirpath (),
257
257
'--cov-report=term-missing' ,
258
258
'--dist=load' ,
259
259
'--tx=popen//python=%s' % exe ,
@@ -269,7 +269,7 @@ def test_funcarg(testdir):
269
269
script = testdir .makepyfile (SCRIPT_FUNCARG )
270
270
271
271
result = testdir .runpytest ('-v' ,
272
- '--cov=%s' % script .dirpath (),
272
+ '--cov' , '--cov-source =%s' % script .dirpath (),
273
273
'--cov-report=term-missing' ,
274
274
script )
275
275
@@ -299,7 +299,7 @@ def test_multiprocessing_subprocess(testdir):
299
299
script = testdir .makepyfile (MULTIPROCESSING_SCRIPT )
300
300
301
301
result = testdir .runpytest ('-v' ,
302
- '--cov=%s' % script .dirpath (),
302
+ '--cov' , '--cov-source =%s' % script .dirpath (),
303
303
'--cov-report=term-missing' ,
304
304
script )
305
305
@@ -340,7 +340,7 @@ def test_cover_conftest(testdir):
340
340
testdir .makeconftest (CONFTEST )
341
341
script = testdir .makepyfile (BASIC_TEST )
342
342
result = testdir .runpytest ('-v' ,
343
- '--cov=%s' % script .dirpath (),
343
+ '--cov' , '--cov-source =%s' % script .dirpath (),
344
344
'--cov-report=term-missing' ,
345
345
script )
346
346
assert result .ret == 0
@@ -352,7 +352,7 @@ def test_cover_conftest_dist(testdir):
352
352
testdir .makeconftest (CONFTEST )
353
353
script = testdir .makepyfile (BASIC_TEST )
354
354
result = testdir .runpytest ('-v' ,
355
- '--cov=%s' % script .dirpath (),
355
+ '--cov' , '--cov-source =%s' % script .dirpath (),
356
356
'--cov-report=term-missing' ,
357
357
'--dist=load' ,
358
358
'--tx=2*popen' ,
@@ -388,7 +388,7 @@ def test_coveragerc(testdir):
388
388
script = testdir .makepyfile (EXCLUDED_TEST )
389
389
result = testdir .runpytest ('-v' ,
390
390
'--cov-config=coveragerc' ,
391
- '--cov=%s' % script .dirpath (),
391
+ '--cov' , '--cov-source =%s' % script .dirpath (),
392
392
'--cov-report=term-missing' ,
393
393
script )
394
394
assert result .ret == 0
@@ -400,7 +400,7 @@ def test_coveragerc_dist(testdir):
400
400
script = testdir .makepyfile (EXCLUDED_TEST )
401
401
result = testdir .runpytest ('-v' ,
402
402
'--cov-config=coveragerc' ,
403
- '--cov=%s' % script .dirpath (),
403
+ '--cov' , '--cov-source =%s' % script .dirpath (),
404
404
'--cov-report=term-missing' ,
405
405
'-n' , '2' ,
406
406
script )
@@ -422,7 +422,7 @@ def test_basic():
422
422
def test_clear_environ (testdir ):
423
423
script = testdir .makepyfile (CLEAR_ENVIRON_TEST )
424
424
result = testdir .runpytest ('-v' ,
425
- '--cov=%s' % script .dirpath (),
425
+ '--cov' , '--cov-source =%s' % script .dirpath (),
426
426
'--cov-report=term-missing' ,
427
427
script )
428
428
assert result .ret == 0
@@ -445,7 +445,7 @@ def test_dist_boxed(testdir):
445
445
script = testdir .makepyfile (SCRIPT_SIMPLE )
446
446
447
447
result = testdir .runpytest ('-v' ,
448
- '--cov=%s' % script .dirpath (),
448
+ '--cov' , '--cov-source =%s' % script .dirpath (),
449
449
'--boxed' ,
450
450
script )
451
451
0 commit comments