set_table.insert().execute({'s3': set(['5'])},
{'s3': set(['5', '7'])}, {'s3': set(['5', '7', '9'])},
{'s3': set(['7', '9'])})
- rows = select([set_table.c.s3], set_table.c.s3.in_([set(['5'
- ]), set(['5', '7']), set(['7', '5'
- ])])).execute().fetchall()
+
+ # NOTE: the string sent to MySQL here is sensitive to ordering.
+ # for some reason the set ordering is always "5, 7" when we test on
+ # MySQLdb but in Py3K this is not guaranteed. So basically our
+ # SET type doesn't do ordering correctly (not sure how it can,
+ # as we don't know how the SET was configured in the first place.)
+ rows = select([set_table.c.s3],
+ set_table.c.s3.in_([set(['5']), ['5', '7']])
+ ).execute().fetchall()
found = set([frozenset(row[0]) for row in rows])
eq_(found, set([frozenset(['5']), frozenset(['5', '7'])]))