Create a new MirixClient per test in the current loop (avoids shared httpx + closed loop).
(server_process, api_auth)
| 88 | |
| 89 | @pytest_asyncio.fixture |
| 90 | async def client(server_process, api_auth): |
| 91 | """Create a new MirixClient per test in the current loop (avoids shared httpx + closed loop).""" |
| 92 | c = await MirixClient.create( |
| 93 | api_key=api_auth["api_key"], |
| 94 | base_url="http://localhost:8000", |
| 95 | debug=False, |
| 96 | ) |
| 97 | config_path = project_root / "mirix" / "configs" / "examples" / "mirix_gemini.yaml" |
| 98 | await c.initialize_meta_agent(config_path=str(config_path), update_agents=False) |
| 99 | if c._meta_agent: |
| 100 | print(f"[OK] Meta agent ready: {c._meta_agent.id}") |
| 101 | return c |
| 102 | |
| 103 | |
| 104 | # ================================================================= |
nothing calls this directly
no test coverage detected