v2.15.0 (#773)
Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com> Co-authored-by: Mathias Gesbert <mathias.gesbert@mistral.ai> Co-authored-by: Maxime Dolores <maxime.dolores@ext.mistral.ai> Co-authored-by: Nelson PROIA <144663685+Nelson-PROIA@users.noreply.github.com> Co-authored-by: Paul VEZIA <166131032+le-codeur-rapide@users.noreply.github.com> Co-authored-by: Pierre Rossinès <pierre.rossines@mistral.ai> Co-authored-by: Quentin <quentin.torroba@mistral.ai> Co-authored-by: Val <102326092+vdeva@users.noreply.github.com> Co-authored-by: Vincent G <10739306+VinceOPS@users.noreply.github.com> Co-authored-by: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
702d0f412e
commit
cafb6d4147
247 changed files with 12401 additions and 3029 deletions
|
|
@ -43,6 +43,26 @@ async def test_no_vars_set_returns_empty() -> None:
|
|||
assert data.model_dump() == {}
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_fingerprint_changes_when_env_changes() -> None:
|
||||
with patch.dict(os.environ, {"VIBE_ACTIVE_MODEL": "first-model"}, clear=True):
|
||||
layer = EnvironmentLayer(schema=VibeConfigSchema)
|
||||
data1 = await layer.load()
|
||||
fp1 = layer.fingerprint
|
||||
|
||||
os.environ["VIBE_ACTIVE_MODEL"] = "second-model"
|
||||
data2 = await layer.load(force=True)
|
||||
fp2 = layer.fingerprint
|
||||
|
||||
assert data1.model_dump() == {"active_model": "first-model"}
|
||||
assert data2.model_dump() == {"active_model": "second-model"}
|
||||
assert isinstance(fp1, str)
|
||||
assert fp1
|
||||
assert isinstance(fp2, str)
|
||||
assert fp2
|
||||
assert fp1 != fp2
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_always_trusted() -> None:
|
||||
assert await EnvironmentLayer(schema=VibeConfigSchema).resolve_trust() is True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue