feat(identity): rename user-visible identity to voculinux with one-time legacy import
The fork takes its own name everywhere a user can see it: binaries (voculinux, voculinux-gui), desktop entry, autostart, tray, D-Bus namespace (com.voculinux.Voculinux, no alias for the old name), config/data/cache dirs, single-instance lock, IBus engine identity, tray icons, resource prefixes, VOCULINUX_* environment names, and the update-checker user agent. The internal Python module stays vocalinux and the distribution metadata keeps the upstream URLs as provenance. On first run a previous Vocalinux install's config.json, custom dictionary, and portal restore token are copied once into the new locations (new config always wins, no merge, no write-back); models re-resolve through the pinned-checksum download path. An offline naming-sweep test proves no old-name strings remain on user-visible surfaces outside the allowlist. Refs #18
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"""
|
||||
Additional coverage tests for main.py module.
|
||||
|
||||
Tests for parse_args(), main(), and VocalinuxApp class (if present).
|
||||
Tests for parse_args(), main(), and VoculinuxApp class (if present).
|
||||
Covers normal startup, debug mode, version flag, keyboard interrupt, and exception handling.
|
||||
"""
|
||||
|
||||
@@ -41,7 +41,7 @@ class TestParseArguments(unittest.TestCase):
|
||||
|
||||
def test_parse_args_defaults(self):
|
||||
"""Test parsing arguments with defaults."""
|
||||
with patch.object(sys, "argv", ["vocalinux"]):
|
||||
with patch.object(sys, "argv", ["voculinux"]):
|
||||
from vocalinux.main import parse_arguments
|
||||
|
||||
args = parse_arguments()
|
||||
@@ -55,7 +55,7 @@ class TestParseArguments(unittest.TestCase):
|
||||
|
||||
def test_parse_args_debug_flag(self):
|
||||
"""Test parsing with debug flag."""
|
||||
with patch.object(sys, "argv", ["vocalinux", "--debug"]):
|
||||
with patch.object(sys, "argv", ["voculinux", "--debug"]):
|
||||
from vocalinux.main import parse_arguments
|
||||
|
||||
args = parse_arguments()
|
||||
@@ -66,18 +66,18 @@ class TestParseArguments(unittest.TestCase):
|
||||
from vocalinux.version import __version__
|
||||
|
||||
output = StringIO()
|
||||
with patch.object(sys, "argv", ["vocalinux", "--version"]):
|
||||
with patch.object(sys, "argv", ["voculinux", "--version"]):
|
||||
from vocalinux.main import parse_arguments
|
||||
|
||||
with redirect_stdout(output), self.assertRaises(SystemExit) as exit_context:
|
||||
parse_arguments()
|
||||
|
||||
assert exit_context.exception.code == 0
|
||||
assert output.getvalue() == f"vocalinux {__version__}\n"
|
||||
assert output.getvalue() == f"voculinux {__version__}\n"
|
||||
|
||||
def test_parse_args_model_argument(self):
|
||||
"""Test parsing with model argument."""
|
||||
with patch.object(sys, "argv", ["vocalinux", "--model", "small"]):
|
||||
with patch.object(sys, "argv", ["voculinux", "--model", "small"]):
|
||||
from vocalinux.main import parse_arguments
|
||||
|
||||
args = parse_arguments()
|
||||
@@ -85,7 +85,7 @@ class TestParseArguments(unittest.TestCase):
|
||||
|
||||
def test_parse_args_language_argument(self):
|
||||
"""Test parsing with language argument."""
|
||||
with patch.object(sys, "argv", ["vocalinux", "--language", "en-us"]):
|
||||
with patch.object(sys, "argv", ["voculinux", "--language", "en-us"]):
|
||||
from vocalinux.main import parse_arguments
|
||||
|
||||
args = parse_arguments()
|
||||
@@ -93,7 +93,7 @@ class TestParseArguments(unittest.TestCase):
|
||||
|
||||
def test_parse_args_engine_argument(self):
|
||||
"""Test parsing with engine argument."""
|
||||
with patch.object(sys, "argv", ["vocalinux", "--engine", "whisper_cpp"]):
|
||||
with patch.object(sys, "argv", ["voculinux", "--engine", "whisper_cpp"]):
|
||||
from vocalinux.main import parse_arguments
|
||||
|
||||
args = parse_arguments()
|
||||
@@ -101,7 +101,7 @@ class TestParseArguments(unittest.TestCase):
|
||||
|
||||
def test_parse_args_wayland_flag(self):
|
||||
"""Test parsing with wayland flag."""
|
||||
with patch.object(sys, "argv", ["vocalinux", "--wayland"]):
|
||||
with patch.object(sys, "argv", ["voculinux", "--wayland"]):
|
||||
from vocalinux.main import parse_arguments
|
||||
|
||||
args = parse_arguments()
|
||||
@@ -109,7 +109,7 @@ class TestParseArguments(unittest.TestCase):
|
||||
|
||||
def test_parse_args_start_minimized_flag(self):
|
||||
"""Test parsing with start-minimized flag."""
|
||||
with patch.object(sys, "argv", ["vocalinux", "--start-minimized"]):
|
||||
with patch.object(sys, "argv", ["voculinux", "--start-minimized"]):
|
||||
from vocalinux.main import parse_arguments
|
||||
|
||||
args = parse_arguments()
|
||||
@@ -117,7 +117,7 @@ class TestParseArguments(unittest.TestCase):
|
||||
|
||||
def test_parse_args_transcribe_file(self):
|
||||
"""Test parsing with the headless --transcribe-file flag."""
|
||||
with patch.object(sys, "argv", ["vocalinux", "--transcribe-file", "/tmp/a.wav"]):
|
||||
with patch.object(sys, "argv", ["voculinux", "--transcribe-file", "/tmp/a.wav"]):
|
||||
from vocalinux.main import parse_arguments
|
||||
|
||||
args = parse_arguments()
|
||||
@@ -157,7 +157,7 @@ class TestParseArguments(unittest.TestCase):
|
||||
sys,
|
||||
"argv",
|
||||
[
|
||||
"vocalinux",
|
||||
"voculinux",
|
||||
"--debug",
|
||||
"--model",
|
||||
"large",
|
||||
@@ -353,13 +353,13 @@ class TestMainFunction(unittest.TestCase):
|
||||
|
||||
output = StringIO()
|
||||
with patch.dict(sys.modules, {"vocalinux.single_instance": mock_single_instance}):
|
||||
with patch.object(sys, "argv", ["vocalinux", "--version"]):
|
||||
with patch.object(sys, "argv", ["voculinux", "--version"]):
|
||||
with redirect_stdout(output):
|
||||
with pytest.raises(SystemExit) as exc_info:
|
||||
main()
|
||||
|
||||
assert exc_info.value.code == 0
|
||||
assert output.getvalue() == f"vocalinux {__version__}\n"
|
||||
assert output.getvalue() == f"voculinux {__version__}\n"
|
||||
mock_single_instance.acquire_lock.assert_not_called()
|
||||
|
||||
@patch("vocalinux.main.check_display_available")
|
||||
|
||||
Reference in New Issue
Block a user