Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /terrene-foundation_kailash-py /packages /kailash-nexus /conftest.py
| # Copyright 2026 Terrene Foundation | |
| # SPDX-License-Identifier: Apache-2.0 | |
| """Pytest rootdir conftest for kailash-nexus — installs the LLM cost-guard. | |
| kailash-nexus declares its own pytest rootdir, so the repo-root conftest guard | |
| never fires for `pytest packages/kailash-nexus`. install_cost_guard withholds | |
| provider secret keys on a bare run, monkeypatches dotenv.load_dotenv so any | |
| module-scope load_dotenv self-scrubs, and actively removes any secret already | |
| present (incl. shell-exported) — provider secrets load only with | |
| KAIZEN_ALLOW_REAL_LLM=1. | |
| """ | |
| from pathlib import Path | |
| from kailash.testing.env_cost_guard import install_cost_guard, scrub_provider_secrets | |
| install_cost_guard(Path(__file__).resolve().parents[2] / ".env") | |
| def pytest_collection_finish(session): | |
| """Backstop: remove any provider secret re-injected during collection.""" | |
| scrub_provider_secrets() | |
Xet Storage Details
- Size:
- 888 Bytes
- Xet hash:
- 4b844ed9ce875c5003bf82485c7d2620911fd8fa8f92ff6c65282b6d361ddf1d
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.