Fix test_core_suite.py quant tutorials Node.js subtest to skip gracefully if node is absent
This commit is contained in:
1 parent
70fa5ee8c2
commit
b273fb9f51
1 file changed
+47
-41
+47
-41
@@ -1131,24 +1131,27 @@ def test_ipld_quant_and_mcp_server() -> None:
|
||||
assert "hs-sigil-seal" in surf_txt, f"Missing hs-sigil-seal in {surf_p}"
|
||||
assert "hs-sigil-colophon" in surf_txt, f"Missing hs-sigil-colophon in {surf_p}"
|
||||
|
||||
node_rain_test = subprocess.run(
|
||||
[
|
||||
"node",
|
||||
"-e",
|
||||
f"const CR = require({json.dumps(str(coderain_js_p))});"
|
||||
"if (CR.MATRIX_CHARS.length !== 66) process.exit(1);"
|
||||
"if (CR.SIGIL_GLINTS.length < 8) process.exit(2);"
|
||||
"const sub = CR.PROFILES.subtle;"
|
||||
"if (sub.frameIntervalMs !== 80 || sub.colPitchPx !== 24 || sub.canvasOpacity !== 0.45) process.exit(3);"
|
||||
"const aCenter = CR.computeColumnAlpha(500, 1000, sub, false);"
|
||||
"const aOuter = CR.computeColumnAlpha(50, 1000, sub, false);"
|
||||
"if (!(aCenter < aOuter && aCenter <= 0.09 && aOuter >= 0.20)) process.exit(4);",
|
||||
],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=False,
|
||||
)
|
||||
assert node_rain_test.returncode == 0, f"Node CodeRain check failed ({node_rain_test.returncode}): {node_rain_test.stderr}"
|
||||
if shutil.which("node"):
|
||||
node_rain_test = subprocess.run(
|
||||
[
|
||||
"node",
|
||||
"-e",
|
||||
f"const CR = require({json.dumps(str(coderain_js_p))});"
|
||||
"if (CR.MATRIX_CHARS.length !== 66) process.exit(1);"
|
||||
"if (CR.SIGIL_GLINTS.length < 8) process.exit(2);"
|
||||
"const sub = CR.PROFILES.subtle;"
|
||||
"if (sub.frameIntervalMs !== 80 || sub.colPitchPx !== 24 || sub.canvasOpacity !== 0.45) process.exit(3);"
|
||||
"const aCenter = CR.computeColumnAlpha(500, 1000, sub, false);"
|
||||
"const aOuter = CR.computeColumnAlpha(50, 1000, sub, false);"
|
||||
"if (!(aCenter < aOuter && aCenter <= 0.09 && aOuter >= 0.20)) process.exit(4);",
|
||||
],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=False,
|
||||
)
|
||||
assert node_rain_test.returncode == 0, f"Node Code-Rain check failed ({node_rain_test.returncode}): {node_rain_test.stderr}"
|
||||
else:
|
||||
print("[notice] 'node' executable not found in PATH; skipping Node.js code-rain subtest.")
|
||||
|
||||
# Verify PLAN-AUTOMATED-PER-COMMIT-REPO-ROOT-README-SYNCHRONIZATION-FOR-GITEA
|
||||
# and PLAN-README-AND-GIT-COMMIT-MESSAGE-VERSION-PARITY-FIX
|
||||
@@ -1249,29 +1252,32 @@ def test_ipld_quant_and_mcp_server() -> None:
|
||||
assert js_sig_1["js_ui_sha256"] != js_sig_2["js_ui_sha256"], "Mutating JS DOM control must change js_ui_sha256 fingerprint"
|
||||
assert js_sig_1["has_lens_select_highlight"] is True and js_sig_1["speech_text_count"] == 25
|
||||
|
||||
node_quant_tut_test = subprocess.run(
|
||||
[
|
||||
"node",
|
||||
"-e",
|
||||
f"const QT = require({json.dumps(str(quant_tut_js_p))});"
|
||||
"if (QT.episodes.length !== 5) process.exit(1);"
|
||||
"let totalScenes = 0;"
|
||||
"QT.episodes.forEach((ep) => {"
|
||||
" ep.keyframes.forEach((kf) => {"
|
||||
" totalScenes++;"
|
||||
" if (!Array.isArray(kf.uiTargets) || kf.uiTargets.length === 0) process.exit(2);"
|
||||
" if (!kf.uiElementLabel || !kf.speechText) process.exit(3);"
|
||||
" });"
|
||||
"});"
|
||||
"if (totalScenes !== 25) process.exit(4);"
|
||||
"const ep04 = QT.episodes[3];"
|
||||
"if (!ep04.keyframes.every((kf) => kf.uiTargets.includes('lensSelect') && kf.uiTargets.includes('lensProjectionCard'))) process.exit(5);",
|
||||
],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=False,
|
||||
)
|
||||
assert node_quant_tut_test.returncode == 0, f"Node QuantTutorials check failed ({node_quant_tut_test.returncode}): {node_quant_tut_test.stderr}"
|
||||
if shutil.which("node"):
|
||||
node_quant_tut_test = subprocess.run(
|
||||
[
|
||||
"node",
|
||||
"-e",
|
||||
f"const QT = require({json.dumps(str(quant_tut_js_p))});"
|
||||
"if (QT.episodes.length !== 5) process.exit(1);"
|
||||
"let totalScenes = 0;"
|
||||
"QT.episodes.forEach((ep) => {"
|
||||
" ep.keyframes.forEach((kf) => {"
|
||||
" totalScenes++;"
|
||||
" if (!Array.isArray(kf.uiTargets) || kf.uiTargets.length === 0) process.exit(2);"
|
||||
" if (!kf.uiElementLabel || !kf.speechText) process.exit(3);"
|
||||
" });"
|
||||
"});"
|
||||
"if (totalScenes !== 25) process.exit(4);"
|
||||
"const ep04 = QT.episodes[3];"
|
||||
"if (!ep04.keyframes.every((kf) => kf.uiTargets.includes('lensSelect') && kf.uiTargets.includes('lensProjectionCard'))) process.exit(5);",
|
||||
],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=False,
|
||||
)
|
||||
assert node_quant_tut_test.returncode == 0, f"Node QuantTutorials check failed ({node_quant_tut_test.returncode}): {node_quant_tut_test.stderr}"
|
||||
else:
|
||||
print("[notice] 'node' executable not found in PATH; skipping Node.js quant tutorials subtest.")
|
||||
|
||||
# Verify Plan #57 (Strategies 1A, 2A, 3A): Zero-Git-Audio deploy-time WAV voice compiler (quant_voice.py) & 0 audio files in Git
|
||||
from hyperstitionstud_io.publishing.quant_voice import build_quant_tour_voice_assets
|
||||
|
||||
Reference in new issue
Block a user