Skip to content
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

Add CLI test changes and explanation #23

Open
purplediane opened this issue Mar 12, 2018 · 0 comments
Open

Add CLI test changes and explanation #23

purplediane opened this issue Mar 12, 2018 · 0 comments

Comments

@purplediane
Copy link
Collaborator

purplediane commented Mar 12, 2018

Location within the Course

  • Section:5
  • Lesson:1
  • Language:English

Description

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant