Skip to content

Commit e19b5a0

Browse files
committed
test for the gendocs script
1 parent 2546f69 commit e19b5a0

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

paths_cli/compiling/gendocs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
@click.argument("config_file")
88
@click.option("--stdout", type=bool, is_flag=True, default=False)
99
def main(config_file, stdout):
10+
"""Generate documentation for installed compiling plugins."""
1011
register_installed_plugins()
1112
config = load_config(config_file)
1213
generator = DocsGenerator(config)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from click.testing import CliRunner
2+
from paths_cli.compiling.gendocs import *
3+
4+
from unittest import mock
5+
6+
@mock.patch('paths_cli.compiling.gendocs.load_config',
7+
mock.Mock(return_value={}))
8+
def test_main():
9+
# this is a smoke test, just to ensure that it doesn't crash;
10+
# functionality testing is in the _gendocs directory
11+
runner = CliRunner()
12+
with runner.isolated_filesystem():
13+
_ = runner.invoke(main, 'fake_config.yml', '--stdout')
14+

0 commit comments

Comments
 (0)