anki-code / anki-code/xonsh-awesome-cli-app
Add tests
- 主要語言
- Python
- 星號
- 10
- 分支
- 0
- PR 合併指標
- 30 天內沒有已合併 PR
描述
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/
```
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。