I observed test runs that failed on 'test_bound_in_scalar' due to arbitrary ordering of the result set. The assertion not only tests for the elements to be present, but also for the correct ordering. Hence, the proposal to add an order_by clause to the select statements.
Change-Id: If1fbb864761e77dfd2a42ef857801c8aaf893bee
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/389
table = self.tables.some_table
stmt = select([table.c.id]).where(
- table.c.x.in_(bindparam('q', expanding=True)))
+ table.c.x.in_(bindparam('q', expanding=True))).order_by(table.c.id)
self._assert_result(
stmt,
table = self.tables.some_table
stmt = select([table.c.id]).where(
- tuple_(table.c.x, table.c.y).in_(bindparam('q', expanding=True)))
+ tuple_(table.c.x, table.c.y).in_(bindparam('q', expanding=True))).order_by(table.c.id)
self._assert_result(
stmt,