from testlib.schema import Table, Column
from testlib.orm import mapper
import testlib.testing as testing
+from testlib.testing import rowset
from testlib.testing import PersistTest, AssertMixin, ORMTest, SQLCompileTest
import testlib.profiling as profiling
import testlib.engines as engines
__all__ = ('testing',
'mapper',
'Table', 'Column',
+ 'rowset',
'PersistTest', 'AssertMixin', 'ORMTest', 'SQLCompileTest',
'profiling', 'engines')
return True
return False
+def rowset(results):
+ """Converts the results of sql execution into a plain set of column tuples.
+
+ Useful for asserting the results of an unordered query.
+ """
+
+ return set([tuple(row) for row in results])
+
class TestData(object):
"""Tracks SQL expressions as they are executed via an instrumented ExecutionContext."""