()
| 97 | |
| 98 | @pytest.mark.unit |
| 99 | def 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 |
nothing calls this directly
no test coverage detected