Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 21 additions & 13 deletions web/tests/test_dds_mvp_js.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,16 @@ def test_dds_mvp_js(self) -> None:
if not node:
raise unittest.SkipTest("node not found")

version = subprocess.run(
[node, "--version"],
capture_output=True,
text=True,
check=False,
).stdout.strip()
try:
version = subprocess.run(
[node, "--version"],
capture_output=True,
text=True,
check=False,
timeout=5,
).stdout.strip()
except subprocess.TimeoutExpired:
raise unittest.SkipTest("node --version timed out")
try:
major = int(version.lstrip("v").split(".", 1)[0])
except ValueError:
Expand All @@ -54,13 +58,17 @@ def test_dds_mvp_js(self) -> None:
dds_mvp_js = rlocation("web/dds_mvp.js")
env = os.environ.copy()
env["DDS_MVP_JS"] = str(dds_mvp_js)
proc = subprocess.run(
[node, "--test", str(test_script)],
capture_output=True,
text=True,
check=False,
env=env,
)
try:
proc = subprocess.run(
[node, "--test", str(test_script)],
capture_output=True,
text=True,
Comment thread
tameware marked this conversation as resolved.
check=False,
env=env,
timeout=55,
)
except subprocess.TimeoutExpired as exc:
self.fail(f"node --test timed out: {exc}")
self.assertEqual(
proc.returncode,
0,
Expand Down
Loading