Coverage for tests/test_cli.py: 100.00%
11 statements
« prev ^ index » next coverage.py v6.4.1, created at 2022-09-04 11:35 +0200
« prev ^ index » next coverage.py v6.4.1, created at 2022-09-04 11:35 +0200
1"""Tests for the `cli` module."""
3import pytest
5from dependenpy import cli
8def test_main():
9 """Basic CLI test."""
10 with pytest.raises(SystemExit) as exit: # noqa: PT012
11 cli.main([])
12 assert exit.code == 2
15def test_show_help(capsys):
16 """
17 Show help.
19 Arguments:
20 capsys: Pytest fixture to capture output.
21 """
22 with pytest.raises(SystemExit):
23 cli.main(["-h"])
24 captured = capsys.readouterr()
25 assert "dependenpy" in captured.out