Files
lix/tests/functional2/eval/test_experimental_features.py
T
Jade LovelaceandJade Lovelace fcea7379d3 fetchTree: make invisible when not available, sorta document
Documenting fetchTree is an exercise in frustration because of the sheer
amount of stringly typed everything in it. I do not know which fields
exist without reading the entirety of libfetchers. However, we can write
something slightly perfunctory but at least perhaps somewhat helpful
documentation-wise.

Fixes: https://git.lix.systems/lix-project/lix/issues/609
Change-Id: I991391b53fcd69172dbc7efb9d384e62bc847b91
2025-03-18 11:34:28 -07:00

11 lines
385 B
Python

from functional2.testlib.fixtures import Nix
def test_fetchTree_presence(nix: Nix):
"""Ensures that fetchTree is actually absent if flakes are disabled"""
settings = nix.settings().feature("nix-command")
assert nix.eval("builtins ? fetchTree", settings).json() == False
settings.feature("flakes")
assert nix.eval("builtins ? fetchTree", settings).json() == True