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:
parent
e2b3517f59
commit
deff22bcc8
2 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue