Add tox and change coverage configuration#311
Merged
egpbos merged 4 commits intoNLeSC:mainfrom Feb 24, 2022
Merged
Conversation
By making testing and coverage separate parts of the configuration, VSCode no longer chokes on discovering tests. This should also make test discovery easier in IDEs like PyCharm. The main problem was that coverage was being treated as default part of testing by always passing coverage flags to pytest (this was also noted in a comment in setup.cfg). Moving this to pyproject.toml may have been unnecessary in the end, but the resources I found online suggested this was the way to go. Adding tox provides a solution to NLeSC#38.
egpbos
added a commit
to egpbos/kwandl
that referenced
this pull request
Feb 22, 2022
sverhoeven
requested changes
Feb 23, 2022
Member
sverhoeven
left a comment
There was a problem hiding this comment.
I depend on GH action to run my tests with different pythons, but doing it locally with tox is helpful.
Can you document a bit the usage of tox and pytest+coverage in the README.dev.md? Now that pytest does not automatically do coverage we should tell the template user about it in another way.
bouweandela
reviewed
Feb 23, 2022
Collaborator
Author
|
@sverhoeven Added documentation in 6d78d07. |
egpbos
added a commit
that referenced
this pull request
Mar 20, 2022
In #311, I forgot to add the .tox directory to .gitignore. Tox stores environments and logs and such there.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 PR changes two things:
toxsupport, which provides a fix for Installing development tools #38 and is just generally nice to have (I personally always add it).coverageor by supplying the flags manually, like is being done in thesonarcloudActions workflow.Edit: also updated a broken link.