mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-23 13:15:29 -04:00
feat(launcher): add portable windows launcher (#976)
* feat(windows): add standalone portable executable, splash screen, and system tray * test: fix test_get_wsl_windows_user_profile_falls_back_to_users_dir on Windows * Refactor launcher: isolate desktop logic into launcher.py, clean app.py/requirements, update build scripts, and add tests * chore: clean launcher test whitespace --------- Co-authored-by: Alexandre Teixeira <alexandremagteixeira@gmail.com>
This commit is contained in:
@@ -153,6 +153,7 @@ def test_get_wsl_windows_user_profile_prefers_powershell(monkeypatch):
|
||||
|
||||
|
||||
def test_get_wsl_windows_user_profile_falls_back_to_users_dir(monkeypatch):
|
||||
import os
|
||||
monkeypatch.setattr(platform_compat, "is_wsl", lambda: True)
|
||||
|
||||
def raise_run(*_a, **_k):
|
||||
@@ -166,11 +167,14 @@ def test_get_wsl_windows_user_profile_falls_back_to_users_dir(monkeypatch):
|
||||
)
|
||||
|
||||
def fake_isdir(path):
|
||||
return path in {"/mnt/c/Users", "/mnt/c/Users/alice"}
|
||||
return os.path.normpath(path) in {
|
||||
os.path.normpath("/mnt/c/Users"),
|
||||
os.path.normpath("/mnt/c/Users/alice")
|
||||
}
|
||||
|
||||
monkeypatch.setattr(platform_compat.os.path, "isdir", fake_isdir)
|
||||
|
||||
assert platform_compat.get_wsl_windows_user_profile() == "/mnt/c/Users/alice"
|
||||
assert platform_compat.get_wsl_windows_user_profile() == os.path.join("/mnt/c/Users", "alice")
|
||||
|
||||
|
||||
def test_get_wsl_windows_user_profile_returns_none_when_nothing_found(monkeypatch):
|
||||
|
||||
Reference in New Issue
Block a user