Preserve macOS app permissions via dynamic launcher, .env workspace path, and session/audio tools
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Tests for bin/profile_tool.py."""
|
||||
|
||||
from bin.profile_tool import get_current_profile, list_profiles, set_profile
|
||||
|
||||
|
||||
def test_profile_tool():
|
||||
# Test profile listing
|
||||
profiles_text = list_profiles()
|
||||
assert len(profiles_text) > 0
|
||||
|
||||
# Test current profile getter
|
||||
cur_profile = get_current_profile()
|
||||
assert isinstance(cur_profile, str)
|
||||
assert len(cur_profile) > 0
|
||||
|
||||
# Test setting valid profile (switch back to current profile to be idempotent)
|
||||
ok, msg = set_profile(cur_profile)
|
||||
assert ok
|
||||
assert cur_profile in msg or "Switched" in msg
|
||||
print(f"PASS: test_profile_tool verified (active profile: '{cur_profile}')")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_profile_tool()
|
||||
print("\nAll profile tool tests passed successfully!")
|
||||
Reference in New Issue
Block a user