Files
clan-core/pkgs/clan-cli/tests/test_cli.py
Jörg Thalheim fe66a740b5 add fixture to capture output in tests less fragile
Now we always remove previous output before capturing.
2024-08-15 18:45:03 +02:00

10 lines
260 B
Python

import pytest
from helpers import cli
from stdout import CaptureOutput
def test_help(capture_output: CaptureOutput) -> None:
with capture_output as output, pytest.raises(SystemExit):
cli.run(["--help"])
assert output.out.startswith("usage:")