Download tests/conftest.py from PYTHAI/mindXtrain: direct link, hf CLI and curl.
- Browser
- Download file 693 Bytes
-
https://huggingface.co/PYTHAI/mindXtrain/resolve/refs%2Fpr%2F1/tests/conftest.py
- Command line
-
hf download hf://PYTHAI/mindXtrain@refs/pr/1/tests/conftest.py
-
curl -L -o conftest.py https://huggingface.co/PYTHAI/mindXtrain/resolve/refs%2Fpr%2F1/tests/conftest.py
693 Bytes
| """Suite-wide hermeticity for the operator's backend auto-detect. | |
| `resolve_backend_name()` probes `bankml serve` on 127.0.0.1:18093 when ollama is not | |
| reachable. A developer box that happens to run bankml would otherwise change what the | |
| auto-detect tests resolve to, so the probe is pinned to "absent" for every test; the | |
| bankml tests that exercise the probe itself monkeypatch it back explicitly. | |
| """ | |
| from __future__ import annotations | |
| import pytest | |
| def _no_live_bankml_probe(monkeypatch: pytest.MonkeyPatch) -> None: | |
| from mindxtrain.operator import app as operator_app | |
| monkeypatch.setattr(operator_app, "_bankml_reachable", lambda *a, **k: False) | |