clan-cli: initialize python project from template
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
This commit is contained in:
16
pkgs/clan-cli/tests/test_cli.py
Normal file
16
pkgs/clan-cli/tests/test_cli.py
Normal file
@@ -0,0 +1,16 @@
|
||||
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:")
|
||||
Reference in New Issue
Block a user