-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
feature: unittests #57
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.
Thanks for working on unit tests to ensure the CLI API does not break unexpectedly!
🙏 🥳 🐳 👍
Yeah. It's already a good start to have these unit tests and we can add more. Perhaps, it would be cool to add a GitHub action for running tests automatically at every commit and PR before merging, if you have time for that! |
Thanks for the review and comments I also think having a code coverage test in actions can help to show how much of the codebase is under test |
- `test_config_file` unittest fixed for missing keys in config file Now it tests against existing keys in config file and ignores the rest (the rest of keys are default and previously are tested in `test_defaults`) - Added coverage package to make code covarage test possible
|
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.
🥳 Thanks for the improved tests! Could you also commit a github action that runs tests at every commit and pull request? 🙏
a github action file for running unittest on PR and pushes with action result badge in README.md
for requirements
Hi @bassosimone , I added the unittest action file.
What is your opinion? Which one is the best approach? |
@RYNEQ At OONI, we generally use codecov or coveralls and link their badge, which, as you say, requires to setup some form of communication between GitHub and one of those services. The other two options that you mention strike me as a bit more work, so perhaps we should try to avoid using them, unless there's some reason not to trust an external coverage service. In such a case, I would just ignore generating the badge and make hack some code to make the GitHub action fail if the coverage decreases by more than, say, 0.5%. |
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.
(Your subsequent changes LGTM! 🐳 )
now supports port option
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.
Thank you @RYNEQ and @bassosimone! ❤️ 🌺
I'm going to merge this. There will be follow-up PR for adding Coveralls workflow.
This is a tryout to add UnitTests to
tracevis
we can now test by
python -m unittest discover test -b
It is not complete yet so PR should wait until most of important tests be complete