1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-09 09:36:20 +09:00

nixos/test-driver: improve wording on comments about new error handling

Co-authored-by: Benoit de Chezelles <bew@users.noreply.github.com>
This commit is contained in:
Maximilian Bosch 2025-03-22 19:13:48 +01:00 committed by GitHub
parent e2b3517f59
commit deff22bcc8
Signed by: github
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -188,6 +188,8 @@ class Driver:
sys.exit(1)
except RequestedAssertionFailed:
exc_type, exc, tb = sys.exc_info()
# We manually print the stack frames, keeping only the ones from the test script
# (note: because the script is not a real file, the frame filename is `<string>`)
filtered = [
frame
for frame in traceback.extract_tb(tb)

View file

@ -15,6 +15,6 @@ class RequestedAssertionFailed(AssertionError):
e.g. a failing `t.assertEqual(...)` or `machine.succeed(...)`.
This gets special treatment in error reporting: i.e. it gets
`!!!` as prefix just as `MachineError`, but all stack frames that are
not from `testScript` also get removed.
`!!!` as prefix just as `MachineError`, but only stack frames coming
from `testScript` will show up in logs.
"""