summaryrefslogtreecommitdiff
path: root/test/testlib/testing.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2008-02-11 00:28:39 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2008-02-11 00:28:39 +0000
commitc0b5a0446bf63bdac664421f49742f1156c1911a (patch)
tree9d7822f91325d23e512e77701c9f1280d968ea20 /test/testlib/testing.py
parent90c572b513fb33cb5cd17134efb6018abc76bb1f (diff)
downloadsqlalchemy-c0b5a0446bf63bdac664421f49742f1156c1911a.tar.gz
- updated the naming scheme of the base test classes in test/testlib/testing.py;
tests extend from either TestBase or ORMTest, using additional mixins for special assertion methods as needed
Diffstat (limited to 'test/testlib/testing.py')
-rw-r--r--test/testlib/testing.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/testlib/testing.py b/test/testlib/testing.py
index 5c37f95bd..8a3028799 100644
--- a/test/testlib/testing.py
+++ b/test/testlib/testing.py
@@ -10,7 +10,7 @@ from testlib.compat import *
sql, sqltypes, schema, MetaData, clear_mappers, Session, util = None, None, None, None, None, None, None
sa_exceptions = None
-__all__ = ('PersistTest', 'AssertMixin', 'ComparesTables', 'ORMTest', 'SQLCompileTest')
+__all__ = ('TestBase', 'AssertsExecutionResults', 'ComparesTables', 'ORMTest', 'AssertsCompiledSQL')
_ops = { '<': operator.lt,
'>': operator.gt,
@@ -434,7 +434,7 @@ class ExecutionContextWrapper(object):
query = re.sub(r':([\w_]+)', repl, query)
return query
-class PersistTest(unittest.TestCase):
+class TestBase(unittest.TestCase):
# A sequence of dialect names to exclude from the test class.
__unsupported_on__ = ()
@@ -464,7 +464,7 @@ class PersistTest(unittest.TestCase):
if not hasattr(unittest.TestCase, 'assertFalse'):
assertFalse = unittest.TestCase.failIf
-class SQLCompileTest(PersistTest):
+class AssertsCompiledSQL(object):
def assert_compile(self, clause, result, params=None, checkparams=None, dialect=None):
if dialect is None:
dialect = getattr(self, '__dialect__', None)
@@ -519,7 +519,7 @@ class ComparesTables(object):
assert reflected_table.primary_key.columns[c.name]
-class AssertMixin(PersistTest):
+class AssertsExecutionResults(object):
def assert_result(self, result, class_, *objects):
result = list(result)
print repr(result)
@@ -629,7 +629,7 @@ class AssertMixin(PersistTest):
testdata.buffer = None
_otest_metadata = None
-class ORMTest(AssertMixin):
+class ORMTest(TestBase, AssertsExecutionResults):
keep_mappers = False
keep_data = False
metadata = None
@@ -690,7 +690,7 @@ class TTestSuite(unittest.TestSuite):
"""A TestSuite with once per TestCase setUpAll() and tearDownAll()"""
def __init__(self, tests=()):
- if len(tests) > 0 and isinstance(tests[0], PersistTest):
+ if len(tests) > 0 and isinstance(tests[0], TestBase):
self._initTest = tests[0]
else:
self._initTest = None