diff options
author | Shaun McCance <shaunm@gnome.org> | 2012-09-11 22:57:18 -0400 |
---|---|---|
committer | Shaun McCance <shaunm@gnome.org> | 2012-09-11 22:57:18 -0400 |
commit | 429131c2ffe3fd69d3f29a66ae7eb9ea127b4e72 (patch) | |
tree | e515e8084b453da08ae7b35210c01d320640cc5b | |
parent | 13e8e0c2ab1fb8c793e86e35fa12cbd7694f7f63 (diff) | |
download | itstool-429131c2ffe3fd69d3f29a66ae7eb9ea127b4e72.tar.gz |
Sort attribute names in test output
-rwxr-xr-x | itstool.in | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1128,8 +1128,8 @@ class Document (object): sys.stderr.write('Error: Unrecognized category %s\n' % category) sys.exit(1) out.write('%s\t%s\n' % (xml_get_node_path(node), compval)) - for child in xml_attr_iter(node): - self.output_test_data(category, out, child) + for attr in sorted(xml_attr_iter(node), lambda x, y: cmp(str(x), str(y))): + self.output_test_data(category, out, attr) for child in xml_child_iter(node): if child.type == 'element': self.output_test_data(category, out, child) |