summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/test/config.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-04-15 00:13:48 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2010-04-15 00:13:48 -0400
commit1cf4a745d83acc51a562ca1d1289cf524fbee33c (patch)
treeb7d175573b73938c1e01cd20fb291d86a60e69a6 /lib/sqlalchemy/test/config.py
parent74a417a5996f829f301853eeed363e5389226107 (diff)
downloadsqlalchemy-1cf4a745d83acc51a562ca1d1289cf524fbee33c.tar.gz
- beef up the --reversetop test option to embed RandomSet throughout the ORM
- with m2m we have to go back to the previous approach of having both sides of the DP fire off, tracking each pair of objects. history may not be consistently present in one side or the other - this revealed a whole lot of issues with self-referential m2m, which are fixed
Diffstat (limited to 'lib/sqlalchemy/test/config.py')
-rw-r--r--lib/sqlalchemy/test/config.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/sqlalchemy/test/config.py b/lib/sqlalchemy/test/config.py
index efbe00fef..7d528a04b 100644
--- a/lib/sqlalchemy/test/config.py
+++ b/lib/sqlalchemy/test/config.py
@@ -1,6 +1,5 @@
import optparse, os, sys, re, ConfigParser, time, warnings
-
# 2to3
import StringIO
@@ -166,15 +165,9 @@ post_configure['table_options'] = _set_table_options
def _reverse_topological(options, file_config):
if options.reversetop:
- from sqlalchemy.orm import unitofwork
+ from sqlalchemy.orm import unitofwork, session, mapper, dependency
from sqlalchemy import topological
- class RevQueueDepSort(topological.QueueDependencySorter):
- def __init__(self, tuples, allitems):
- self.tuples = list(tuples)
- self.allitems = list(allitems)
- self.tuples.reverse()
- self.allitems.reverse()
- topological.QueueDependencySorter = RevQueueDepSort
- unitofwork.DependencySorter = RevQueueDepSort
+ from sqlalchemy.test.util import RandomSet
+ topological.set = unitofwork.set = session.set = mapper.set = dependency.set = RandomSet
post_configure['topological'] = _reverse_topological