Mercurial > hg > ltpdarepo
changeset 148:f594c49a3da4
Make schema dump predictable ordering tables and columns by name.
author | Daniele Nicolodi <nicoldi@science.unitn.it> |
---|---|
date | Fri, 21 Oct 2011 19:04:34 +0200 |
parents | 85b2bc3c7e04 |
children | d2d83ea3f369 |
files | src/ltpdarepo/tests/dump.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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():