summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/tests/test_platform.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-node/tests/test_platform.py')
-rw-r--r--packages/meshbay-node/tests/test_platform.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/meshbay-node/tests/test_platform.py b/packages/meshbay-node/tests/test_platform.py
index 92e74df..3fb27f3 100644
--- a/packages/meshbay-node/tests/test_platform.py
+++ b/packages/meshbay-node/tests/test_platform.py
@@ -71,6 +71,10 @@ def test_check_media_tools_raises_when_ffmpeg_is_missing(monkeypatch):
def test_check_media_tools_stores_the_resolved_paths(monkeypatch):
+ # This call writes two module globals, and what undoes them is the autouse
+ # `_restore_media_tool_paths` fixture in conftest.py -- see it for what went
+ # wrong when nothing did. Deliberately not repeated here: one mechanism, one
+ # explanation, or the two drift.
monkeypatch.setattr(plat.shutil, "which",
lambda n: f"/opt/bin/{n}.exe")
plat.check_media_tools("ffmpeg", "ffprobe")
@@ -365,6 +369,9 @@ def test_service_install_uses_s4u_not_a_stored_password(monkeypatch):
credential validation, and omitting /rp registers "Interactive only",
which never runs at boot or on demand. See platform.py's service mode
comment for the full story."""
+ # Service mode is Windows-only and refuses outright anywhere else;
+ # every other test in this file says so, these two never did.
+ monkeypatch.setattr(sys, "platform", "win32")
monkeypatch.setattr(plat, "_current_user", lambda: "DOMAIN\\user")
calls = []
monkeypatch.setattr(
@@ -388,6 +395,9 @@ def test_service_install_tolerates_no_startup_launcher_present(win_startup, monk
def test_service_install_raises_with_powershells_error_message(monkeypatch):
+ # Service mode is Windows-only and refuses outright anywhere else;
+ # every other test in this file says so, these two never did.
+ monkeypatch.setattr(sys, "platform", "win32")
monkeypatch.setattr(plat, "_current_user", lambda: "DOMAIN\\user")
monkeypatch.setattr(
plat.subprocess, "run",