mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-25 18:34:32 +02:00
Ensure reliable sort order for tests
This commit is contained in:
parent
faedf951e4
commit
5a813bae6d
1 changed files with 2 additions and 0 deletions
|
|
@ -1984,6 +1984,7 @@ class Table(Queryable):
|
|||
)
|
||||
).fetchall()
|
||||
]
|
||||
most_common.sort(key=lambda p: (p[1], p[0]), reverse=True)
|
||||
if num_distinct <= common_limit:
|
||||
# No need to run the query if it will just return the results in revers order
|
||||
least_common = None
|
||||
|
|
@ -1996,6 +1997,7 @@ class Table(Queryable):
|
|||
)
|
||||
).fetchall()
|
||||
]
|
||||
least_common.sort(key=lambda p: (p[1], p[0]))
|
||||
return ColumnDetails(
|
||||
self.name,
|
||||
column,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue