File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,10 @@ def report_execution_time():
126
126
click .echo (f"Finished in { formated_duration } " )
127
127
128
128
129
+ # Preserve click.command below to keep type checker happy
130
+ # docstub: off
129
131
@click .command ()
132
+ # docstub: on
130
133
@click .version_option (__version__ )
131
134
@click .argument ("root_path" , type = click .Path (exists = True ), metavar = "PACKAGE_PATH" )
132
135
@click .option (
Original file line number Diff line number Diff line change 4
4
from pathlib import Path
5
5
6
6
import click
7
+ from click .testing import CliRunner
7
8
8
9
from docstub ._cli import main as docstub_main
9
10
@@ -30,7 +31,9 @@ def test_getting_started_example(tmp_path):
30
31
py_file = tmp_path / "example.py"
31
32
with py_file .open ("x" ) as io :
32
33
io .write (py_source )
33
- docstub_main ([str (py_file )], standalone_mode = False )
34
+ runner = CliRunner ()
35
+ result = runner .invoke (docstub_main , [str (py_file )])
36
+ assert result .exit_code == 0
34
37
35
38
# Load created PYI file, this is what we expect to find in the user guide's
36
39
# code block for example.pyi
You can’t perform that action at this time.
0 commit comments