prep 0.2.6

This commit is contained in:
Javanaut
2026-04-13 20:04:25 +02:00
parent e614ca5d75
commit 037388886e
49 changed files with 5702 additions and 490 deletions

View File

@@ -49,6 +49,9 @@ class ConfigureWorkstationScriptTests(unittest.TestCase):
"HOME": str(self.home_dir),
"PATH": f"{self.stub_bin_dir}:{os.environ.get('PATH', '')}",
"FFX_PYTHON": str(BUNDLE_PYTHON),
"LANG": "C.UTF-8",
"LC_ALL": "C.UTF-8",
"LC_MESSAGES": "C.UTF-8",
**env_overrides,
}
@@ -76,6 +79,7 @@ class ConfigureWorkstationScriptTests(unittest.TestCase):
self.assertEqual(
{
"databasePath": str(self.home_dir / ".local" / "var" / "ffx" / "ffx.db"),
"language": "de",
"logDirectory": str(self.home_dir / ".local" / "var" / "log"),
"subtitlesDirectory": str(
self.home_dir / ".local" / "var" / "sync" / "subtitles"
@@ -113,6 +117,24 @@ class ConfigureWorkstationScriptTests(unittest.TestCase):
config_data,
)
def test_script_seeds_system_language_into_default_config(self):
completed = self.run_script(
LANG="fr_FR.UTF-8",
LC_ALL="fr_FR.UTF-8",
LC_MESSAGES="fr_FR.UTF-8",
)
self.assertEqual(
0,
completed.returncode,
f"STDOUT:\n{completed.stdout}\nSTDERR:\n{completed.stderr}",
)
config_path = self.home_dir / ".local" / "etc" / "ffx.json"
config_data = json.loads(config_path.read_text(encoding="utf-8"))
self.assertEqual("fr", config_data["language"])
def test_script_honors_custom_template_override(self):
custom_template_path = Path(self.tempdir.name) / "custom-config.j2"
custom_template_path.write_text(