2023-07-21 10:48:26 +00:00
|
|
|
import pytest
|
2023-08-24 15:09:04 +00:00
|
|
|
from cli import Cli
|
2023-07-20 16:07:27 +00:00
|
|
|
|
|
|
|
|
2023-08-24 15:09:04 +00:00
|
|
|
def test_help(capsys: pytest.CaptureFixture) -> None:
|
|
|
|
cli = Cli()
|
2023-07-21 00:01:39 +00:00
|
|
|
with pytest.raises(SystemExit):
|
2023-08-24 15:09:04 +00:00
|
|
|
cli.run(["--help"])
|
2023-07-20 16:07:27 +00:00
|
|
|
captured = capsys.readouterr()
|
2023-07-21 00:01:39 +00:00
|
|
|
assert captured.out.startswith("usage:")
|