test: add tests for setup wizard personalization and system prompt builder

Cover _USE_CASE_PLUGINS mapping, _suggest_plugins side effects, _build_system_base
output for all name/purpose combinations, and GeneralConfig.purpose round-trip.
Also update CLAUDE.md with the testing workflow rule.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
curo1305
2026-05-19 10:43:20 +02:00
parent ace9561c87
commit 9735a5559e
4 changed files with 177 additions and 0 deletions
+10
View File
@@ -55,6 +55,14 @@ def test_general_config_defaults():
g = GeneralConfig()
assert g.user_name == "User"
assert g.assistant_name == "Pyra"
assert g.purpose == ""
def test_general_config_purpose_roundtrip():
from pyra.config.schema import GeneralConfig
cfg = GeneralConfig(user_name="Alice", purpose="manage servers")
assert cfg.user_name == "Alice"
assert cfg.purpose == "manage servers"
def test_pyraconfig_has_general_and_plugin_settings():
@@ -70,11 +78,13 @@ def test_config_round_trip_preserves_general(tmp_pyra_home):
cfg = PyraConfig(ai=ProviderConfig(provider_id="ollama", model="llama3"))
cfg.general.user_name = "Alice"
cfg.general.assistant_name = "Aria"
cfg.general.purpose = "manage my home server"
save_config(cfg)
loaded = load_config()
assert loaded.general.user_name == "Alice"
assert loaded.general.assistant_name == "Aria"
assert loaded.general.purpose == "manage my home server"
def test_config_round_trip_preserves_plugin_settings(tmp_pyra_home):