File size: 693 Bytes
76258e9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"""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


@pytest.fixture(autouse=True)
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)