feat(node_assets): add image plane geometry nodes and validation scripts
- Implemented `image_plane.py` to build the Image Plane Geometry Nodes group with customizable parameters for geometry, subdivide, and thickness. - Created `image_plane_validation.py` to validate the functionality of the image plane, ensuring correct geometry generation and material assignment. - Developed `material_layers.py` to construct shader node groups for image materials, including depth and normal handling. - Authored `plane_layouts.py` to define node arrangements for image geometry assets. - Introduced `shadeless.py` to create a shadeless shader node group that displays color without scene lighting while preserving shadows and reflections.
This commit is contained in:
42
tests/test_docs_command.py
Normal file
42
tests/test_docs_command.py
Normal file
@@ -0,0 +1,42 @@
|
||||
import importlib.util
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
SCRIPT_PATH = Path(__file__).resolve().parents[1] / "tools" / "docs.py"
|
||||
SPEC = importlib.util.spec_from_file_location("docs_script", SCRIPT_PATH)
|
||||
docs = importlib.util.module_from_spec(SPEC)
|
||||
SPEC.loader.exec_module(docs)
|
||||
|
||||
|
||||
def test_documentation_command_deploys_project_version(monkeypatch):
|
||||
monkeypatch.setattr(docs, "project_version", lambda: "1.2.3")
|
||||
|
||||
assert docs.documentation_command() == [
|
||||
"mike",
|
||||
"deploy",
|
||||
"--update-aliases",
|
||||
"1.2.3",
|
||||
"latest",
|
||||
]
|
||||
|
||||
|
||||
def test_documentation_command_previews_current_source():
|
||||
assert docs.documentation_command(dev=True) == ["mkdocs", "serve"]
|
||||
|
||||
|
||||
def test_main_runs_from_project_root(monkeypatch):
|
||||
calls = []
|
||||
monkeypatch.setattr(
|
||||
docs.subprocess,
|
||||
"run",
|
||||
lambda *args, **kwargs: calls.append((args, kwargs)),
|
||||
)
|
||||
|
||||
docs.main(["-dev"])
|
||||
|
||||
assert calls == [
|
||||
(
|
||||
(["mkdocs", "serve"],),
|
||||
{"cwd": docs.PROJECT_ROOT, "check": True},
|
||||
)
|
||||
]
|
||||
Reference in New Issue
Block a user