generated from Luis/nextjs-python-web-template
19 lines
389 B
Python
19 lines
389 B
Python
import sys
|
|
|
|
import clan
|
|
import pytest
|
|
|
|
|
|
def test_no_args(capsys):
|
|
clan.clan()
|
|
captured = capsys.readouterr()
|
|
assert captured.out.startswith("usage:")
|
|
|
|
|
|
def test_help(capsys, monkeypatch):
|
|
monkeypatch.setattr(sys, "argv", ["", "--help"])
|
|
with pytest.raises(SystemExit):
|
|
clan.clan()
|
|
captured = capsys.readouterr()
|
|
assert captured.out.startswith("usage:")
|