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

Add CLI test changes and explanation

Abierto
#23 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Sin datos de lenguaje
Estrellas
8
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.