Skip to content

Commit 2603073

Browse files
committed
update tests with new cmd API
1 parent af3cb29 commit 2603073

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

pytest-cov/test_pytest_cov.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def test_central(testdir):
9696
script = testdir.makepyfile(SCRIPT)
9797

9898
result = testdir.runpytest('-v',
99-
'--cov=%s' % script.dirpath(),
99+
'--cov', '--cov-source=%s' % script.dirpath(),
100100
'--cov-report=term-missing',
101101
script)
102102

@@ -112,7 +112,7 @@ def test_no_cov_on_fail(testdir):
112112
script = testdir.makepyfile(SCRIPT_FAIL)
113113

114114
result = testdir.runpytest('-v',
115-
'--cov=%s' % script.dirpath(),
115+
'--cov', '--cov-source=%s' % script.dirpath(),
116116
'--cov-report=term-missing',
117117
'--no-cov-on-fail',
118118
script)
@@ -125,7 +125,7 @@ def test_dist_collocated(testdir):
125125
script = testdir.makepyfile(SCRIPT)
126126

127127
result = testdir.runpytest('-v',
128-
'--cov=%s' % script.dirpath(),
128+
'--cov', '--cov-source=%s' % script.dirpath(),
129129
'--cov-report=term-missing',
130130
'--dist=load',
131131
'--tx=2*popen',
@@ -145,7 +145,7 @@ def test_dist_not_collocated(testdir):
145145
dir2 = testdir.mkdir('dir2')
146146

147147
result = testdir.runpytest('-v',
148-
'--cov=%s' % script.dirpath(),
148+
'--cov', '--cov-source=%s' % script.dirpath(),
149149
'--cov-report=term-missing',
150150
'--dist=load',
151151
'--tx=popen//chdir=%s' % dir1,
@@ -167,7 +167,7 @@ def test_central_subprocess(testdir):
167167
parent_script = scripts.dirpath().join('parent_script.py')
168168

169169
result = testdir.runpytest('-v',
170-
'--cov=%s' % scripts.dirpath(),
170+
'--cov', '--cov-source=%s' % scripts.dirpath(),
171171
'--cov-report=term-missing',
172172
parent_script)
173173

@@ -185,7 +185,7 @@ def test_dist_subprocess_collocated(testdir):
185185
parent_script = scripts.dirpath().join('parent_script.py')
186186

187187
result = testdir.runpytest('-v',
188-
'--cov=%s' % scripts.dirpath(),
188+
'--cov', '--cov-source=%s' % scripts.dirpath(),
189189
'--cov-report=term-missing',
190190
'--dist=load',
191191
'--tx=2*popen',
@@ -209,7 +209,7 @@ def test_dist_subprocess_not_collocated(testdir, tmpdir):
209209
dir2 = tmpdir.mkdir('dir2')
210210

211211
result = testdir.runpytest('-v',
212-
'--cov=%s' % scripts.dirpath(),
212+
'--cov', '--cov-source=%s' % scripts.dirpath(),
213213
'--cov-report=term-missing',
214214
'--dist=load',
215215
'--tx=popen//chdir=%s' % dir1,
@@ -230,7 +230,7 @@ def test_empty_report(testdir):
230230
script = testdir.makepyfile(SCRIPT)
231231

232232
result = testdir.runpytest('-v',
233-
'--cov=non_existent_module',
233+
'--cov', '--cov-source=non_existent_module',
234234
'--cov-report=term-missing',
235235
script)
236236

@@ -253,7 +253,7 @@ def test_dist_missing_data(testdir):
253253
script = testdir.makepyfile(SCRIPT)
254254

255255
result = testdir.runpytest('-v',
256-
'--cov=%s' % script.dirpath(),
256+
'--cov', '--cov-source=%s' % script.dirpath(),
257257
'--cov-report=term-missing',
258258
'--dist=load',
259259
'--tx=popen//python=%s' % exe,
@@ -269,7 +269,7 @@ def test_funcarg(testdir):
269269
script = testdir.makepyfile(SCRIPT_FUNCARG)
270270

271271
result = testdir.runpytest('-v',
272-
'--cov=%s' % script.dirpath(),
272+
'--cov', '--cov-source=%s' % script.dirpath(),
273273
'--cov-report=term-missing',
274274
script)
275275

@@ -299,7 +299,7 @@ def test_multiprocessing_subprocess(testdir):
299299
script = testdir.makepyfile(MULTIPROCESSING_SCRIPT)
300300

301301
result = testdir.runpytest('-v',
302-
'--cov=%s' % script.dirpath(),
302+
'--cov', '--cov-source=%s' % script.dirpath(),
303303
'--cov-report=term-missing',
304304
script)
305305

@@ -340,7 +340,7 @@ def test_cover_conftest(testdir):
340340
testdir.makeconftest(CONFTEST)
341341
script = testdir.makepyfile(BASIC_TEST)
342342
result = testdir.runpytest('-v',
343-
'--cov=%s' % script.dirpath(),
343+
'--cov', '--cov-source=%s' % script.dirpath(),
344344
'--cov-report=term-missing',
345345
script)
346346
assert result.ret == 0
@@ -352,7 +352,7 @@ def test_cover_conftest_dist(testdir):
352352
testdir.makeconftest(CONFTEST)
353353
script = testdir.makepyfile(BASIC_TEST)
354354
result = testdir.runpytest('-v',
355-
'--cov=%s' % script.dirpath(),
355+
'--cov', '--cov-source=%s' % script.dirpath(),
356356
'--cov-report=term-missing',
357357
'--dist=load',
358358
'--tx=2*popen',
@@ -388,7 +388,7 @@ def test_coveragerc(testdir):
388388
script = testdir.makepyfile(EXCLUDED_TEST)
389389
result = testdir.runpytest('-v',
390390
'--cov-config=coveragerc',
391-
'--cov=%s' % script.dirpath(),
391+
'--cov', '--cov-source=%s' % script.dirpath(),
392392
'--cov-report=term-missing',
393393
script)
394394
assert result.ret == 0
@@ -400,7 +400,7 @@ def test_coveragerc_dist(testdir):
400400
script = testdir.makepyfile(EXCLUDED_TEST)
401401
result = testdir.runpytest('-v',
402402
'--cov-config=coveragerc',
403-
'--cov=%s' % script.dirpath(),
403+
'--cov', '--cov-source=%s' % script.dirpath(),
404404
'--cov-report=term-missing',
405405
'-n', '2',
406406
script)
@@ -422,7 +422,7 @@ def test_basic():
422422
def test_clear_environ(testdir):
423423
script = testdir.makepyfile(CLEAR_ENVIRON_TEST)
424424
result = testdir.runpytest('-v',
425-
'--cov=%s' % script.dirpath(),
425+
'--cov', '--cov-source=%s' % script.dirpath(),
426426
'--cov-report=term-missing',
427427
script)
428428
assert result.ret == 0
@@ -445,7 +445,7 @@ def test_dist_boxed(testdir):
445445
script = testdir.makepyfile(SCRIPT_SIMPLE)
446446

447447
result = testdir.runpytest('-v',
448-
'--cov=%s' % script.dirpath(),
448+
'--cov', '--cov-source=%s' % script.dirpath(),
449449
'--boxed',
450450
script)
451451

0 commit comments

Comments
 (0)