twoscoops / twoscoops/Creating-and-Distributing-Python-Packages

Add CLI test changes and explanation

オープン
#23 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
言語のデータがありません
スター
8
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

説明

## 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_.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 ` --help` on the command line. Instead of "Usage: \", it returns "Usage: main".

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。