-
Notifications
You must be signed in to change notification settings - Fork 37
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
Fix multiple issues in tests #358
Fix multiple issues in tests #358
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I'm aware, we do not track coverage of the tests/
folder itself, pytest settings in pyproject.toml specify --cov=mcstatus
, meaning we only take coverage from the mcstatus/
folder into consideration in the reports. What's the purpose of adding no cover comments into the tests themselves?
All tests in |
20cad3b
to
b9cabb9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All tests in
mcstatus/tests
, so they go to coverage report. Reason is I don't know, just saw some dead code, and wanted to fix it.
Wouldn't it then be a better idea to just change the pytest settings to not report coverage in tests?
Yes. But this isn't a goal of this PR, this PR just fixes some dead tests. |
b9cabb9
to
f1786f7
Compare
According to PR's title, Increase coverage in |
I can't describe in another words why I'm documenting some test's parts with |
I agree, but let's not include the pragma ignores in here and only fix the issues with tests naming, you can rename the PR to |
f1786f7
to
62efe7d
Compare
tests/
foldera2dcf43
to
3f16c13
Compare
|
It's ok, in fact it probably should be there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good. Only some small change requests from me.
660f601
to
edd0c7d
Compare
This includes: - Move all tests from `mcstatus` folder, so they now won't be in coverage reports and in releases. - Rename for some classes, so they will be collected by pytest. - Change path for formatters, linters etc. to `.` instead of `./mcstatus`. (Tests also should be formatted and checked)
edd0c7d
to
10e9592
Compare
Because of removing tests from coverage report, coverage is now 79% (and it's lower than 80%, so tests are failing). |
I think we can drop the requirement to 70% for now |
This includes:
mcstatus
folder, so they now won't be in coverage reports and in releases..
instead of./mcstatus
. (Tests also should be formatted and checked)And the second commit reduces the minimum coverage to 70%, I created #371 to bring it back to 80%.