forked from lix-project/nix-eval-jobs
commit
97dd8023e8
|
@ -69,9 +69,17 @@ def test_expression() -> None:
|
||||||
with open(TEST_ROOT.joinpath("assets/ci.nix"), "r") as ci_nix:
|
with open(TEST_ROOT.joinpath("assets/ci.nix"), "r") as ci_nix:
|
||||||
common_test(["-E", ci_nix.read()])
|
common_test(["-E", ci_nix.read()])
|
||||||
|
|
||||||
|
|
||||||
def test_eval_error() -> None:
|
def test_eval_error() -> None:
|
||||||
with TemporaryDirectory() as tempdir:
|
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(
|
res = subprocess.run(
|
||||||
cmd,
|
cmd,
|
||||||
cwd=TEST_ROOT.joinpath("assets"),
|
cwd=TEST_ROOT.joinpath("assets"),
|
||||||
|
@ -80,4 +88,4 @@ def test_eval_error() -> None:
|
||||||
)
|
)
|
||||||
attrs = json.loads(res.stdout)
|
attrs = json.loads(res.stdout)
|
||||||
assert attrs["attr"] == "brokenPackage"
|
assert attrs["attr"] == "brokenPackage"
|
||||||
assert "this is an evaluation error" in attrs["error"]
|
assert "this is an evaluation error" in attrs["error"]
|
||||||
|
|
Loading…
Reference in a new issue