summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/test
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/test')
-rw-r--r--lib/sqlalchemy/test/assertsql.py3
-rw-r--r--lib/sqlalchemy/test/config.py13
-rw-r--r--lib/sqlalchemy/test/noseplugin.py2
3 files changed, 6 insertions, 12 deletions
diff --git a/lib/sqlalchemy/test/assertsql.py b/lib/sqlalchemy/test/assertsql.py
index d67de2355..81ef73a7c 100644
--- a/lib/sqlalchemy/test/assertsql.py
+++ b/lib/sqlalchemy/test/assertsql.py
@@ -173,7 +173,8 @@ class CompiledSQL(SQLMatchRule):
self._result = equivalent
if not self._result:
self._errmsg = "Testing for compiled statement %r partial params %r, " \
- "received %r with params %r" % (self.statement, all_params, _received_statement, all_received)
+ "received %r with params %r" % \
+ (self.statement, all_params, _received_statement, all_received)
class CountStatements(AssertRule):
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
diff --git a/lib/sqlalchemy/test/noseplugin.py b/lib/sqlalchemy/test/noseplugin.py
index 5e8e21e8f..6a3106e69 100644
--- a/lib/sqlalchemy/test/noseplugin.py
+++ b/lib/sqlalchemy/test/noseplugin.py
@@ -51,7 +51,7 @@ class NoseSQLAlchemy(Plugin):
callback=_engine_strategy,
help="Engine strategy (plain or threadlocal, defaults to plain)")
opt("--reversetop", action="store_true", dest="reversetop", default=False,
- help="Reverse the collection ordering for topological sorts (helps "
+ help="Use a random-ordering set implementation in the ORM (helps "
"reveal dependency issues)")
opt("--unhashable", action="store_true", dest="unhashable", default=False,
help="Disallow SQLAlchemy from performing a hash() on mapped test objects.")