def test_calc_cutoff(): target = 14 expected = 2 got = f.calc_cutoff(target, partial_capture) eq_(expected, got)
def test_calc_cutoff_bad_coverage(): target = 23 # > 22 available expected_message = 'Not enough reads available for desired genome coverage (bases needed=23 > actual=22)' with pytest.raises(f.GenomeCoverageError) as ctx: f.calc_cutoff(target, partial_capture) assert expected_message == str(ctx.value)
def test_calc_cutoff_bad_coverage(): target = 23 # > 22 available expected_message = 'Not enough reads available for desired genome coverage (bases needed=23 > actual=22)' with assert_raises(f.GenomeCoverageError) as ctx: f.calc_cutoff(target, partial_capture) eq_(expected_message, ctx.exception.message)