Files
lix/tests/functional2/lang/err_context/test_err_context.py
T
Commentator2.0 c63ba3c485 tests/functional2/lang: migrated first tests
Change-Id: I4b5755a63d9454db20f63f751f5f33564a2ee5be
2025-06-01 20:19:37 +02:00

11 lines
421 B
Python

from functional2.testlib.fixtures.nix import Nix
def test_err_context(nix: Nix):
# the lang test framework doesn't check this folder, as there is a custom test in here
# it won't scream about missing an `in.nix` or .exp files
result = nix.nix_instantiate(
["--show-trace", "--eval", "-E", 'builtins.addErrorContext "Hello" (throw "Foo")']
).run()
assert "Hello" in result.expect(1).stderr_s