Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .template_sync/migrations/v0_1_46_to_v0_1_47.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
1. app/bash_bat_scripts/pre_uninstall.bat gets six lines just before its line `echo Pre-uninstall completed!`: three REM lines, the app folder
(the folder of the script), one PowerShell command that stops every process whose program is inside the app folder (a Jupyter server and its kernels, a Napari or
Fiji tool worker), except the uninstaller and its helpers, and waits up to 15 s for each to end, and a line that shows its log
(%TEMP%\labconstrictor_pre_uninstall.log). A script without that line is left as it
(%TEMP%\\labconstrictor_pre_uninstall.log). A script without that line is left as it
is (SKIPPED, with what to do by hand). The file keeps its own line endings.

Linux and macOS are not changed: a running process does not stop the removal of its files there. The change reaches users with the app's next
Expand Down
8 changes: 8 additions & 0 deletions tests/test_template_sync_0_1_47.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import sys
import tempfile
import unittest
import warnings
from contextlib import redirect_stdout
from io import StringIO
from pathlib import Path
Expand Down Expand Up @@ -63,6 +64,13 @@ def test_the_command_survives_cmd_and_spares_the_uninstaller(self) -> None:
for name in ("UNDERSCORED_PROJECT_NAME", "PROJECT_NAME", "BASE_PATH"):
self.assertNotIn(name, "".join(MIGRATION.STOP_LINES), "no placeholder: the lines are the same in every app")

def test_every_migration_compiles_without_a_warning(self) -> None:
"""An invalid escape such as \\l in a docstring warns at each sync run (SyntaxWarning), which reads as a fault in the sync log."""
for path in sorted((ROOT / ".template_sync").rglob("*.py")):
with self.subTest(file=path.name), warnings.catch_warnings():
warnings.simplefilter("error")
compile(path.read_text(encoding="utf-8"), str(path), "exec")

def test_the_manifest_lists_the_migration_and_the_version(self) -> None:
text = (ROOT / ".template_sync/manifest.yaml").read_text(encoding="utf-8")
self.assertRegex(text, r"template_version: 0\.1\.(4[7-9]|[5-9][0-9])\b")
Expand Down
Loading