You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We create the CLI in 5.1 but we don't talk about how to make the test_command_line_interface in test_<package>.py work.
If there are inputs for the command line, they need to be specified as strings in a list as in result = runner.invoke(cli.main, ['4']).
Also, maybe because of the way we have a cli.py file, calling help_result = runner.invoke(cli.main, ['--help']) in the test code gives a different answer than <package> --help on the command line. Instead of "Usage: <package>", it returns "Usage: main".
The text was updated successfully, but these errors were encountered:
Location within the Course
Description
We create the CLI in 5.1 but we don't talk about how to make the
test_command_line_interface
intest_<package>.py
work.If there are inputs for the command line, they need to be specified as strings in a list as in
result = runner.invoke(cli.main, ['4'])
.Also, maybe because of the way we have a
cli.py
file, callinghelp_result = runner.invoke(cli.main, ['--help'])
in the test code gives a different answer than<package> --help
on the command line. Instead of "Usage: <package>", it returns "Usage: main".The text was updated successfully, but these errors were encountered: