diff options
| author | Jason Kirtland <jek@discorporate.us> | 2007-11-01 19:40:08 +0000 |
|---|---|---|
| committer | Jason Kirtland <jek@discorporate.us> | 2007-11-01 19:40:08 +0000 |
| commit | 1bf0aee385e3164254bed0dcc6e005613806a665 (patch) | |
| tree | 96b4854a5a616b1acc14eb2775a123728e83ce3b /test/testlib/testing.py | |
| parent | ca73fbab87d271ed9e63f8f4f0d13036ac46279a (diff) | |
| download | sqlalchemy-1bf0aee385e3164254bed0dcc6e005613806a665.tar.gz | |
Added rowset() testing helper.
Diffstat (limited to 'test/testlib/testing.py')
| -rw-r--r-- | test/testlib/testing.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/testlib/testing.py b/test/testlib/testing.py index a1fb174b7..43bbb92ff 100644 --- a/test/testlib/testing.py +++ b/test/testlib/testing.py @@ -124,6 +124,14 @@ def against(*queries): 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.""" |
