standardize packaging, tooling, docs, CI, and licensing
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
from pathlib import Path
|
||||
|
||||
from docforge.cli.main import cli
|
||||
|
||||
|
||||
def test_mcp_build(cli_runner):
|
||||
with cli_runner.isolated_filesystem():
|
||||
cwd = Path.cwd()
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
from pathlib import Path
|
||||
|
||||
from docforge.cli.main import cli
|
||||
|
||||
|
||||
def test_mkdocs_build_full_flow(
|
||||
cli_runner,
|
||||
mock_mkdocs_build,
|
||||
@@ -17,11 +19,11 @@ def test_mkdocs_build_full_flow(
|
||||
|
||||
nav_file = cwd / "docforge.nav.yml"
|
||||
nav_file.write_text("home: testpkg/index.md\ngroups: {}\n")
|
||||
|
||||
|
||||
# We need to create a dummy testpkg/index.md for nav resolution if it's there
|
||||
# But generate_sources will create it.
|
||||
# But generate_sources will create it.
|
||||
# Wait, the current logic runs generate_sources first, THEN generate_config.
|
||||
|
||||
|
||||
result = cli_runner.invoke(
|
||||
cli,
|
||||
[
|
||||
@@ -43,11 +45,13 @@ def test_mkdocs_build_full_flow(
|
||||
assert (cwd / "mkdocs.yml").exists()
|
||||
assert (cwd / "docs" / "testpkg" / "mod.md").exists()
|
||||
|
||||
|
||||
def test_mkdocs_build_missing_module_fails(cli_runner):
|
||||
result = cli_runner.invoke(cli, ["build", "--mkdocs", "--site-name", "Test"])
|
||||
assert result.exit_code != 0
|
||||
assert "--module is required" in result.output
|
||||
|
||||
|
||||
def test_mkdocs_build_without_site_name_uses_module_as_default_full_flow(
|
||||
cli_runner,
|
||||
mock_mkdocs_build,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from docforge.cli.main import cli
|
||||
|
||||
|
||||
def test_mcp_serve(
|
||||
cli_runner,
|
||||
fake_mcp_docs,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from docforge.cli.main import cli
|
||||
|
||||
|
||||
def test_mkdocs_serve(
|
||||
cli_runner,
|
||||
fake_mkdocs_yml,
|
||||
|
||||
Reference in New Issue
Block a user