summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/tests/test_packaging_win.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-19 17:58:05 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-19 17:58:05 +0200
commit1ec316035ce9aa656dd18a05889856bce9e3aba3 (patch)
treeb50e97f50d485ef2a88ce36fe4d7511d9fe3e288 /packages/meshbay-node/tests/test_packaging_win.py
parent171a3e175889ce30f201fcdf5c4632f480344ae6 (diff)
parent95dd3dc13aecec85c2fd72410cd4d1f4ed582dfa (diff)
downloadmeshbay-1ec316035ce9aa656dd18a05889856bce9e3aba3.tar.gz
Merge origin/main: the tree-wide ruff pass beside the Music reconnect work
Diffstat (limited to 'packages/meshbay-node/tests/test_packaging_win.py')
-rw-r--r--packages/meshbay-node/tests/test_packaging_win.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/meshbay-node/tests/test_packaging_win.py b/packages/meshbay-node/tests/test_packaging_win.py
index 7b44bbe..aa77c29 100644
--- a/packages/meshbay-node/tests/test_packaging_win.py
+++ b/packages/meshbay-node/tests/test_packaging_win.py
@@ -1230,13 +1230,14 @@ def test_service_mode_ps1_starts_the_task_after_installing_it():
already-running task pointlessly on every mode switch away from service.
"""
src = (WIN / "service-mode.ps1").read_text(encoding="utf-8")
- install_branch, remove_branch = src.split('$Action -eq "install"', 1)[1], None
+ install_branch = src.split('$Action -eq "install"', 1)[1]
assert '"run"' in install_branch or "'run'" in install_branch, (
"service-mode.ps1 registers the task but never starts it -- the "
"daemon stays down until the next reboot")
# The run step must be conditioned on install having actually succeeded,
# not fired unconditionally regardless of $Action.
- guard_line = src[src.index('$Action -eq "install"') - 40:src.index('$Action -eq "install"') + 40]
+ at = src.index('$Action -eq "install"')
+ guard_line = src[at - 40:at + 40]
assert "-and" in guard_line or "-not $failed" in install_branch, (
"the follow-up `run` must be gated on Action=install and success, "
"not run unconditionally on every invocation including remove")