Official Codebase of 3DCodeVerse
Python
tests: test_shader's imports at the top (ruff I001)
gaoypeng978aa4afce97
diff --git a/harness/tests/scene_runtime/lib/test_shader.py b/harness/tests/scene_runtime/lib/test_shader.pyindex ecd7b2cd..2c3a381c 100644--- a/harness/tests/scene_runtime/lib/test_shader.py+++ b/harness/tests/scene_runtime/lib/test_shader.py@@ -2,8 +2,11 @@cache key, roughness composition, one tick, and every construction path on the GPU."""from __future__ import annotations+import math+import re+import pytest-from _probe import compile_scene, measure+from _probe import LIB_DIR, compile_scene, measurepytestmark = pytest.mark.node@@ -446,7 +449,6 @@ def wind() -> dict:@pytest.mark.parametrize("spelling", ["object", "pair", "number", "vec3"])def test_one_wind_is_read_the_same_way_by_every_effect(wind, spelling):- import mathw = wind[spelling]ref = w["read"]# the number has no direction of its own: it blows along the fallback's@@ -468,8 +470,6 @@ def test_the_surface_gradient_bump_is_written_once():kept their own copy after the helper landed, and stream.js's had no guard, so agrazing pixel shaded NaN. Only tree.js's clamped variant and windows.js'scotangent frame (a different job) build a screen-space frame of their own."""- import re- from _probe import LIB_DIRframe = re.compile(r"cross\(\s*\w+\s*,\s*(normal|n)\s*\)")own = sorted(p.name for p in LIB_DIR.glob("*.js") if frame.search(p.read_text(encoding="utf-8")))assert own == ["shader.js", "tree.js", "windows.js"], own