diff options
author | Johan Dahlin <johan@gnome.org> | 2010-09-23 19:11:59 -0300 |
---|---|---|
committer | Johan Dahlin <johan@gnome.org> | 2010-09-23 19:11:59 -0300 |
commit | e262dcaf557df83bd40572a8f94032a4da6148c5 (patch) | |
tree | 98f59a48d8f78b2cae28574e6a67fdadf2cdd1e1 | |
parent | c26e458dea7e3895a9adcdbb6acc0c657f7363c2 (diff) | |
download | gobject-introspection-e262dcaf557df83bd40572a8f94032a4da6148c5.tar.gz |
[warningtester] Prettify error output
-rw-r--r-- | tests/warn/warningtester.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/warn/warningtester.py b/tests/warn/warningtester.py index 2948c747..d43b6d5e 100644 --- a/tests/warn/warningtester.py +++ b/tests/warn/warningtester.py @@ -108,8 +108,12 @@ def check(args): warnings.remove('') if len(expected_warnings) != len(warnings): raise SystemExit( - "ERROR: expected %d warnings, but got %d: %r\n" % ( - len(expected_warnings), len(warnings), warnings)) + "ERROR in %r: expected %d warnings, but got %d:\n" + "----\nexpected:\n%s\n----\ngot:\n%s\n----" % ( + os.path.basename(filename), + len(expected_warnings), len(warnings), + '\n'.join([w[1] for w in expected_warnings]), + '\n'.join([w.split(':', 2)[2][1:] for w in warnings]))) for warning, (sort_key, expected) in zip(warnings, expected_warnings): actual = warning.split(":", 1)[1] if _diff(expected, actual, filename): |