Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment counts towards coverage in this case #24170

Open
bpasero opened this issue Sep 24, 2024 · 0 comments
Open

Comment counts towards coverage in this case #24170

bpasero opened this issue Sep 24, 2024 · 0 comments
Assignees
Labels
triage-needed Needs assignment to the proper sub-team

Comments

@bpasero
Copy link
Member

bpasero commented Sep 24, 2024

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.

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

2 participants