# HG changeset patch # User Daniele Nicolodi # Date 1319216674 -7200 # Node ID f594c49a3da4fe9291665f75ad4ae1b7738d5d01 # Parent 85b2bc3c7e049afb85e552acf8603279ba7b2e57 Make schema dump predictable ordering tables and columns by name. diff -r 85b2bc3c7e04 -r f594c49a3da4 src/ltpdarepo/tests/dump.py --- a/src/ltpdarepo/tests/dump.py Fri Oct 21 14:47:30 2011 +0200 +++ b/src/ltpdarepo/tests/dump.py Fri Oct 21 19:04:34 2011 +0200 @@ -33,12 +33,12 @@ f.write(inspector.default_schema_name) with f.indent(): # tables - for table in inspector.get_table_names(): + for table in sorted(inspector.get_table_names()): f.write('table: %s' % table) with f.indent(): dump_table(inspector, table, f) # views - for view in inspector.get_view_names(): + for view in sorted(inspector.get_view_names()): f.write('view: %s' % view) with f.indent(): dump_table(inspector, view, f) @@ -48,7 +48,7 @@ # columns f.write('columns:') with f.indent(): - for column in inspector.get_columns(table): + for column in sorted(inspector.get_columns(table)): f.write('- %s' % column.pop('name')) with f.indent(): for k, v in column.iteritems():