diff options
author | Dieter Verfaillie <dieterv@optionexplicit.be> | 2013-05-28 17:28:20 +0200 |
---|---|---|
committer | Dieter Verfaillie <dieterv@optionexplicit.be> | 2013-10-08 20:53:55 +0200 |
commit | 30b32be1aba7277077fa82b9ac28d07a41c60e50 (patch) | |
tree | 30ac5ce6635b666727ebce6811abc18e2cff2a3b /tests/warn/warningtester.py | |
parent | 8ba87a7a8d91ec4eb26a0fa294280d09b52543f4 (diff) | |
download | gobject-introspection-30b32be1aba7277077fa82b9ac28d07a41c60e50.tar.gz |
tests: fix warning tests message sorting...
... by using the actual line numbers instead of sorting
the whole expected/emitted string. The latter is wrong as
for example tests/warn/annotationparser.h line 109
got sorted before line 120 which got sorted before
line 12.
Diffstat (limited to 'tests/warn/warningtester.py')
-rw-r--r-- | tests/warn/warningtester.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/warn/warningtester.py b/tests/warn/warningtester.py index fc3c3d2d..63a1e646 100644 --- a/tests/warn/warningtester.py +++ b/tests/warn/warningtester.py @@ -130,8 +130,9 @@ def check(args): expected_warnings = _extract_expected(filename) - expected_warnings.sort() - emitted_warnings.sort() + sortkey = lambda x: int(x.split(':')[0]) + expected_warnings.sort(key=sortkey) + emitted_warnings.sort(key=sortkey) if len(expected_warnings) != len(emitted_warnings): raise SystemExit('ERROR in %r: %d warnings were emitted, ' |