Increase coverage by ~0.37% and take a few files to 100% #590
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is related to #395. I did not increase coverage by 1%, but tried to tackle some larger files (by the end it became tedious so I did a couple of small files as well).
test/test_transitions.py
could be refactored withparametrize
. Since there would be many parameters, this may also involve creating aparameters.py
. However, there are a bunch of files in the same folder so instead of moving files around or coming up with my own naming convention (such asparameters_transitions.py
), I just added new tests using the same pattern that was used back in the day.drawing.py
's line 1178 because I felt there was a typo there. The way it is it could trigger both line 177 and 181, causing an error becausecoerce
does not handleNone
(which is not really consistent with having defaultedpaint_rule
toDONT_PAINT
just before).expected
values). I tried not to rely on that, but noticeably updated an unrelated test so that line 847 inshearing
would get coverage.Checklist:
The GitHub pipeline is OK (green),
meaning that both
pylint
(static code analyzer) andblack
(code formatter) are happy with the changes of this PR.A unit test is covering the code added / modified by this PR
This PR is ready to be merged
In case of a new feature, docstrings have been added, with also some documentation in the
docs/
folderA mention of the change is present in
CHANGELOG.md
By submitting this pull request, I confirm that my contribution is made under the terms of the GNU LGPL 3.0 license.