-
Notifications
You must be signed in to change notification settings - Fork 261
Figlet no arguments test #276
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
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 submitting a PR!
In test_no_arguments
, the if
condition and the raise
statement are mismatched. Also, I believe that since the program is waiting for the user's input, we should use prompt=True
. Essentially, if figlet.py
is ran without any args and a valid std input (expected behavior), then we would expect a successful exit code of 0
, but the raise
statement doesn't match this expectation.
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.
Echoing @bxngyn, I think we can simply test whether running the program without interacting with it returns an exit code of 0. If it does, then the program fails the no arguments test, because it should exit with a non-zero code when no arguments are provided.
I changed the prompt argument to True and changed the messaging for clarity. |
Thank you! |
I added a test to check the error code of figlet.py run without arguments.
There was not a test for exit code when running figlet.py without arguments. This is a requirement for the assignment that should randomly select a font, prompt for input, then output the ASCII art.
This is a replacement of PR #275. This time it only has the individual change.