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

Closed
bpasero opened this issue Sep 24, 2024 · 3 comments
Closed

Comment counts towards coverage in this case #24170

bpasero opened this issue Sep 24, 2024 · 3 comments
Assignees
Labels
area-testing 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
@eleanorjboyd
Copy link
Member

seeing the same thing as the other issue you submitted where the comments do not account for line coverage. Will give this another try once I know the python version you are using

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Sep 24, 2024
@bpasero
Copy link
Member Author

bpasero commented Sep 25, 2024

@eleanorjboyd I am using 3.12.5

Image

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Sep 25, 2024
@eleanorjboyd
Copy link
Member

same as other one- these numbers come from the package so I don't think we have to worry about this

@eleanorjboyd eleanorjboyd closed this as not planned Won't fix, can't repro, duplicate, stale Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-testing triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

2 participants