Skip to content

Commit

Permalink
Merge pull request #283 from nix-community/joerg-ci
Browse files Browse the repository at this point in the history
apply treefmt
  • Loading branch information
Mic92 authored Dec 10, 2023
2 parents f970ec3 + b267eb9 commit 97dd802
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/test_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,17 @@ def test_expression() -> None:
with open(TEST_ROOT.joinpath("assets/ci.nix"), "r") as ci_nix:
common_test(["-E", ci_nix.read()])


def test_eval_error() -> None:
with TemporaryDirectory() as tempdir:
cmd = [str(BIN), "--gc-roots-dir", tempdir, "--meta", "--flake", ".#legacyPackages.x86_64-linux"]
cmd = [
str(BIN),
"--gc-roots-dir",
tempdir,
"--meta",
"--flake",
".#legacyPackages.x86_64-linux",
]
res = subprocess.run(
cmd,
cwd=TEST_ROOT.joinpath("assets"),
Expand All @@ -80,4 +88,4 @@ def test_eval_error() -> None:
)
attrs = json.loads(res.stdout)
assert attrs["attr"] == "brokenPackage"
assert "this is an evaluation error" in attrs["error"]
assert "this is an evaluation error" in attrs["error"]

0 comments on commit 97dd802

Please sign in to comment.