File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -349,11 +349,25 @@ def test_cov_min_float_value(testdir):
349349 result = testdir .runpytest ('-v' ,
350350 '--cov=%s' % script .dirpath (),
351351 '--cov-report=term-missing' ,
352- '--cov-fail-under=51.03 ' ,
352+ '--cov-fail-under=88.88 ' ,
353353 script )
354354 assert result .ret == 0
355355 result .stdout .fnmatch_lines ([
356- 'Required test coverage of 51.03% reached. Total coverage: *%'
356+ 'Required test coverage of 88.88% reached. Total coverage: 88.89%'
357+ ])
358+
359+
360+ def test_cov_min_float_value_not_reached (testdir ):
361+ script = testdir .makepyfile (SCRIPT )
362+
363+ result = testdir .runpytest ('-v' ,
364+ '--cov=%s' % script .dirpath (),
365+ '--cov-report=term-missing' ,
366+ '--cov-fail-under=88.89' ,
367+ script )
368+ assert result .ret == 1
369+ result .stdout .fnmatch_lines ([
370+ 'FAIL Required test coverage of 88.89% not reached. Total coverage: 88.89%'
357371 ])
358372
359373
You can’t perform that action at this time.
0 commit comments