anki-code / anki-code/xonsh-awesome-cli-app
Add tests
- Lenguaje dominante
- Python
- Estrellas
- 10
- Forks
- 0
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
To start:
* [Unit tests using xonsh syntax](https://github.com/xonsh/xonsh/discussions/5303#discussioncomment-8786332)
* [Xonsh tests](https://github.com/xonsh/xonsh/tree/main/tests)
* [Xxh Development Environment with tests](https://github.com/xxh/xxh/tree/7222c47482a8e46cbdf1eb23589f40962425a4a0/xde)
* [click tests](https://click.palletsprojects.com/en/8.1.x/testing/)
This is working but `result.output` is not captured:
```xsh
from click.testing import CliRunner
from xonsh_awesome_cli_app.cli import cli
def test_say():
runner = CliRunner()
result = runner.invoke(cli, ['--name', 'Peter', 'say', 'hello'])
# assert result.exit_code == 0
assert result.output == 'Peter say: hello\n'
```
```xsh
pytest tests/
```
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.