added cli

This commit is contained in:
2026-01-20 20:47:28 +05:30
parent 7c027834c0
commit 8b2d6a5046
13 changed files with 390 additions and 0 deletions

24
tests/cli/test_tree.py Normal file
View File

@@ -0,0 +1,24 @@
from docforge.cli.main import cli
def test_tree_command(cli_runner, temp_package):
(temp_package / "mod.py").write_text(
'''
class A:
def f(self): ...
'''
)
result = cli_runner.invoke(
cli,
[
"tree",
"--modules",
"testpkg.mod",
],
)
assert result.exit_code == 0
assert "testpkg" in result.output
assert "mod" in result.output
assert "A" in result.output