test(#4813): resolve node via shutil.which + skip if absent (CI portability)
The hardcoded /home/hermes/.local/bin/node doesn't exist in CI runners. Use
shutil.which('node') with a module-level skipif, matching the repo's other
node-driven tests.
This commit is contained in:
1 parent
eb331b5163
commit
f84db40a23
1 file changed
+5
-1
@@ -9,12 +9,16 @@ prefixed value was saved and the cron model override broke.
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import shutil
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
REPO = Path(__file__).resolve().parents[1]
|
||||
PANELS_JS = (REPO / "static" / "panels.js").read_text(encoding="utf-8")
|
||||
NODE = "/home/hermes/.local/bin/node"
|
||||
NODE = shutil.which("node")
|
||||
pytestmark = pytest.mark.skipif(NODE is None, reason="node not available")
|
||||
|
||||
|
||||
def _fn_body(name: str) -> str:
|
||||
|
||||
Reference in new issue
Block a user