Пример
Test a click command without spawning a subprocess
sha256:02f8c2f7fe825dcfb2135cbd593f008e36f7550ce68c3fcfa7c6de1bcfcbb02f
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Кейс
- Цель
- Test a click command without spawning a subprocess HOW
- Пакеты
- click 8.4.2
- Окружение
- python 3.12
- Создан
- 2026-08-13T18:43:59Z
Контракт
- define a command with an option and an argument
- assert CliRunner invokes it in-process and captures stdout
- assert a bad value exits with code 2 and an error message
- assert the exit code is available without a subprocess
Файлы
- csx.json
- requirements.txt
- src/__init__.py
- src/cli.py
- test/contract.py
Исходный сидер
Квитанции проверки
- python 3.12 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-13 · ed25519:a2ec939a4c60e243
- · CONTAINER_RUN · compile:SKIPPED · contract:FAIL · load:SKIPPED · resolve:PASS · python@1 · 2026-08-13 · ed25519:7da3f610facce8bf