nix-update/tests/test_savanna.py

28 lines
733 B
Python
Raw Normal View History

import subprocess
import conftest
2021-07-27 18:54:25 +03:00
from nix_update.options import Options
from nix_update.update import update
def test_update(helpers: conftest.Helpers) -> None:
with helpers.testpkgs() as path:
opts = Options(attribute="savanna", import_path=str(path))
update(opts)
version = subprocess.run(
[
"nix",
"eval",
"--raw",
"--extra-experimental-features",
2021-07-27 18:54:25 +03:00
"nix-command",
"-f",
path,
"savanna.version",
],
text=True,
stdout=subprocess.PIPE,
).stdout.strip()
assert tuple(map(int, version.split("."))) >= (0, 6, 8)