clan-cli: remove unnecessary unit test file clan-cli: fix shell.nix too stateful clan-cli: remove conftest.py clan-cli: fix flake-module.nix
17 lines
356 B
Python
17 lines
356 B
Python
import sys
|
|
|
|
import my_tool
|
|
|
|
|
|
def test_no_args(capsys):
|
|
my_tool.my_cli()
|
|
captured = capsys.readouterr()
|
|
assert captured.out.startswith("usage:")
|
|
|
|
|
|
def test_version(capsys, monkeypatch):
|
|
monkeypatch.setattr(sys, "argv", ["", "--version"])
|
|
my_tool.my_cli()
|
|
captured = capsys.readouterr()
|
|
assert captured.out.startswith("Version:")
|