Commit a910676 1 parent 68a1513 commit a910676 Copy full SHA for a910676
File tree 2 files changed +9
-5
lines changed
2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 11
11
def serve_docs (build_dir : Path , port : int = 8000 ) -> NoReturn : # type: ignore [misc]
12
12
"""Serve the documentation on a local development server."""
13
13
14
- if not build_dir .exists ():
14
+ html_dir = build_dir / "html"
15
+
16
+ if not html_dir .exists ():
15
17
raise FileNotFoundError (
16
18
"Documentation not found. Run 'sphinx-autodoc-vyper' first to generate the documentation."
17
19
)
18
20
19
- os .chdir (build_dir )
21
+ os .chdir (html_dir )
20
22
21
23
handler = http .server .SimpleHTTPRequestHandler
22
24
Original file line number Diff line number Diff line change 14
14
def test_server_start (tmp_path : Path ) -> None :
15
15
"""Test server startup and accessibility."""
16
16
# Create mock build directory
17
- build_dir = tmp_path / "docs" / "_build" / "html"
18
- build_dir .mkdir (parents = True )
19
- (build_dir / "index.html" ).write_text ("<html><body>Test</body></html>" )
17
+ build_dir = tmp_path / "docs" / "_build"
18
+
19
+ html_dir = build_dir / "html"
20
+ html_dir .mkdir (parents = True )
21
+ (html_dir / "index.html" ).write_text ("<html><body>Test</body></html>" )
20
22
21
23
# Generate documentation
22
24
cli ._main (contracts_dir = "" , output_dir = str (build_dir ))
You can’t perform that action at this time.
0 commit comments