Spaces:
Runtime error
Runtime error
Download src/tests/conftest.py from VashuTheGreat2/Multi-Rag: direct link, hf CLI and curl.
- Browser
- Download file 521 Bytes
-
https://huggingface.co/spaces/VashuTheGreat2/Multi-Rag/resolve/main/src/tests/conftest.py
- Command line
-
hf download hf://spaces/VashuTheGreat2/Multi-Rag/src/tests/conftest.py
-
curl -L -o conftest.py https://huggingface.co/spaces/VashuTheGreat2/Multi-Rag/resolve/main/src/tests/conftest.py
521 Bytes
| from fastapi.testclient import TestClient | |
| import pytest | |
| def pytest_configure(): | |
| import logfire | |
| configure = logfire.configure | |
| def configure_for_tests(*args, **kwargs): | |
| kwargs["send_to_logfire"] = False | |
| return configure(*args, **kwargs) | |
| logfire.configure = configure_for_tests | |
| logfire.instrument_system_metrics = lambda: None | |
| logfire.instrument_fastapi = lambda app: None | |
| def client(): | |
| from api.app import app | |
| with TestClient(app) as e: | |
| yield e |