MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / test_describe_format

Function test_describe_format

tests/test_providers.py:99–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

97
98@pytest.mark.unit
99def test_describe_format() -> None:
100 monkey_env = os.environ.copy()
101 try:
102 for var in [
103 "PAPERFLOW_LLM_PROVIDER",
104 "PAPERFLOW_EMBED_PROVIDER",
105 "PAPERFLOW_LLM_MODEL",
106 "PAPERFLOW_EMBED_MODEL",
107 "PAPERFLOW_EMBED_DIMENSIONS",
108 ]:
109 os.environ.pop(var, None)
110 os.environ["PAPERFLOW_LLM_PROVIDER"] = "mock"
111 os.environ["PAPERFLOW_EMBED_PROVIDER"] = "hash"
112 config = load_provider_config()
113 text = config.describe()
114 assert "llm=mock:" in text
115 assert "embed=hash:" in text
116 finally:
117 os.environ.clear()
118 os.environ.update(monkey_env)
119
120
121@pytest.mark.unit

Callers

nothing calls this directly

Calls 2

load_provider_configFunction · 0.90
describeMethod · 0.80

Tested by

no test coverage detected