generate test command fixed
This commit is contained in:
@@ -3,21 +3,24 @@ from pathlib import Path
|
||||
from docforge.cli.main import cli
|
||||
|
||||
|
||||
def test_generate_command(cli_runner, temp_package, tmp_path: Path):
|
||||
(temp_package / "mod.py").write_text(
|
||||
'''
|
||||
def f(): ...
|
||||
'''
|
||||
)
|
||||
def test_generate_command(cli_runner):
|
||||
with cli_runner.isolated_filesystem():
|
||||
cwd = Path.cwd()
|
||||
|
||||
docs_dir = tmp_path / "docs"
|
||||
# Create package structure
|
||||
pkg = cwd / "testpkg"
|
||||
pkg.mkdir()
|
||||
(pkg / "__init__.py").write_text("")
|
||||
(pkg / "mod.py").write_text("def f(): ...\n")
|
||||
|
||||
docs_dir = cwd / "docs"
|
||||
|
||||
result = cli_runner.invoke(
|
||||
cli,
|
||||
[
|
||||
"generate",
|
||||
"--modules",
|
||||
"testpkg.mod",
|
||||
"--module",
|
||||
"testpkg",
|
||||
"--docs-dir",
|
||||
str(docs_dir),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user