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
Write tests for __main__.py #54
Comments
@KevinHock, can I contribute to solving this issue? (I am still a beginner in OS.) |
Sure @yongzx, I can try to write the first test to give you a better idea of what I had in mind, I'll write it sometime today, push it to a branch, and let you know. Apologies for not doing this initially. |
Thanks! It's alright, I was just intending to ask you about the test you had in mind. |
Hmm, so https://github.com/python-security/pyt/compare/54_tests_for_main is a test for what happens when we pass no args to the program. There is a problem though, if we look at |
(Merged it so it's just easier than 2 people contributing to one branch.) I think the next step is to call main with random args (e.g. Print def use graph to a file) and make tests that verify it does what it currently does. Let me know if you'd like me to write the first of one of these. |
I will give it a try first. Thanks for the clarification. |
Just understood the codes in |
Sounds good, thanks. Feel free to take your time, let me know if you need any help. |
I did this in another branch already, gonna merge in a week or two, but I figured I would close this now. |
As we can see on CodeClimate https://codeclimate.com/github/python-security/pyt/coverage/5935971dbf92ed000102998b there is pretty low test coverage of main, I understand why this is but adding some tests for it would increase our test coverage percentage and 75% isn't satisfying.
If you have any trouble with this I can help, I am going to label this issue as Easy so new comers see it.
The text was updated successfully, but these errors were encountered: