added ruff for code review

This commit is contained in:
ykcheungab
2026-09-27 19:21:03 +08:00
parent f91ac9d3db
commit e7dfd4f90b
28 changed files with 434 additions and 69 deletions
+4 -1
View File
@@ -76,11 +76,14 @@ requires_blender = pytest.mark.skipif(
def _run_blender(script: Path, job: Path, timeout: int = 900) -> subprocess.CompletedProcess:
assert BLENDER is not None
# check=False is deliberate: several tests assert on non-zero Blender exit
# codes (2/3), so a non-zero status is data, not an error to raise on.
return subprocess.run(
[str(BLENDER), "-b", str(SOURCE_BLEND), "-P", str(script), "--", "--job", str(job)],
capture_output=True,
text=True,
timeout=timeout,
check=False,
)
@@ -248,7 +251,7 @@ def test_job_carries_the_hard_render_settings(paths, settings, tmp_path):
assert job["objects"] == {"mesh": "sensing_surface", "camera": "cam_sensor"}
assert job["null_frame"] == {"name": REFERENCE_NULL_NAME, "seed": 1}
assert job["artifacts"]["report"] == str(
(Path(tmp_path).resolve() / render.MANIFEST_FILENAME)
Path(tmp_path).resolve() / render.MANIFEST_FILENAME
)
assert job["artifacts"]["frames_npz"] == str(
deform.probe_artifact_paths(Path(tmp_path))["frames"]