Skip to content

Comment counts towards coverage in this case #24170

@bpasero

Description

@bpasero

Testing #24156

I had this test:

@pytest.mark.parametrize("num", range(1, 10))
# this is unclear
def test_num(num):
    time.sleep(0.3)
    assert True
    # nd even more

And it was reported as 100% coverage without comments, but 85% with comments:

Image

This was part of the https://github.com/eleanorjboyd/inc_dec_example_repo/blob/main/inc_dec_example_test_suite/test_unit_and_pytest_combo.py repo.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions