summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/testing')
-rw-r--r--lib/sqlalchemy/testing/assertions.py12
-rw-r--r--lib/sqlalchemy/testing/assertsql.py6
-rw-r--r--lib/sqlalchemy/testing/config.py2
-rw-r--r--lib/sqlalchemy/testing/engines.py8
-rw-r--r--lib/sqlalchemy/testing/entities.py4
-rw-r--r--lib/sqlalchemy/testing/exclusions.py4
-rw-r--r--lib/sqlalchemy/testing/fixtures.py10
-rw-r--r--lib/sqlalchemy/testing/pickleable.py12
-rw-r--r--lib/sqlalchemy/testing/plugin/plugin_base.py2
-rw-r--r--lib/sqlalchemy/testing/profiling.py2
-rw-r--r--lib/sqlalchemy/testing/provision.py2
-rw-r--r--lib/sqlalchemy/testing/requirements.py2
-rw-r--r--lib/sqlalchemy/testing/schema.py4
-rw-r--r--lib/sqlalchemy/testing/suite/test_types.py2
14 files changed, 36 insertions, 36 deletions
diff --git a/lib/sqlalchemy/testing/assertions.py b/lib/sqlalchemy/testing/assertions.py
index 3aa2649f4..ed634befe 100644
--- a/lib/sqlalchemy/testing/assertions.py
+++ b/lib/sqlalchemy/testing/assertions.py
@@ -368,7 +368,7 @@ def _assert_raises(
return ec.error
-class _ErrorContainer(object):
+class _ErrorContainer:
error = None
@@ -414,7 +414,7 @@ def expect_raises_message(except_cls, msg, check_context=True):
return _expect_raises(except_cls, msg=msg, check_context=check_context)
-class AssertsCompiledSQL(object):
+class AssertsCompiledSQL:
def assert_compile(
self,
clause,
@@ -496,14 +496,14 @@ class AssertsCompiledSQL(object):
if compile_kwargs:
kw["compile_kwargs"] = compile_kwargs
- class DontAccess(object):
+ class DontAccess:
def __getattribute__(self, key):
raise NotImplementedError(
"compiler accessed .statement; use "
"compiler.current_executable"
)
- class CheckCompilerAccess(object):
+ class CheckCompilerAccess:
def __init__(self, test_statement):
self.test_statement = test_statement
self._annotations = {}
@@ -596,7 +596,7 @@ class AssertsCompiledSQL(object):
)
-class ComparesTables(object):
+class ComparesTables:
def assert_tables_equal(self, table, reflected_table, strict_types=False):
assert len(table.c) == len(reflected_table.c)
for c, reflected_c in zip(table.c, reflected_table.c):
@@ -640,7 +640,7 @@ class ComparesTables(object):
)
-class AssertsExecutionResults(object):
+class AssertsExecutionResults:
def assert_result(self, result, class_, *objects):
result = list(result)
print(repr(result))
diff --git a/lib/sqlalchemy/testing/assertsql.py b/lib/sqlalchemy/testing/assertsql.py
index 9816c99b7..485a13f82 100644
--- a/lib/sqlalchemy/testing/assertsql.py
+++ b/lib/sqlalchemy/testing/assertsql.py
@@ -16,7 +16,7 @@ from ..engine.default import DefaultDialect
from ..schema import _DDLCompiles
-class AssertRule(object):
+class AssertRule:
is_consumed = False
errormessage = None
@@ -382,7 +382,7 @@ class Or(AllOf):
self.errormessage = list(self.rules)[0].errormessage
-class SQLExecuteObserved(object):
+class SQLExecuteObserved:
def __init__(self, context, clauseelement, multiparams, params):
self.context = context
self.clauseelement = clauseelement
@@ -408,7 +408,7 @@ class SQLCursorExecuteObserved(
pass
-class SQLAsserter(object):
+class SQLAsserter:
def __init__(self):
self.accumulated = []
diff --git a/lib/sqlalchemy/testing/config.py b/lib/sqlalchemy/testing/config.py
index 097eb94e4..8faeea634 100644
--- a/lib/sqlalchemy/testing/config.py
+++ b/lib/sqlalchemy/testing/config.py
@@ -106,7 +106,7 @@ def mark_base_test_class():
return _fixture_functions.mark_base_test_class()
-class Config(object):
+class Config:
def __init__(self, db, db_opts, options, file_config):
self._set_name(db)
self.db = db
diff --git a/lib/sqlalchemy/testing/engines.py b/lib/sqlalchemy/testing/engines.py
index 815009e78..98de5df5c 100644
--- a/lib/sqlalchemy/testing/engines.py
+++ b/lib/sqlalchemy/testing/engines.py
@@ -19,7 +19,7 @@ from .. import event
from .. import pool
-class ConnectionKiller(object):
+class ConnectionKiller:
def __init__(self):
self.proxy_refs = weakref.WeakKeyDictionary()
self.testing_engines = collections.defaultdict(set)
@@ -202,7 +202,7 @@ def all_dialects(exclude=None):
yield mod.dialect()
-class ReconnectFixture(object):
+class ReconnectFixture:
def __init__(self, dbapi):
self.dbapi = dbapi
self.connections = []
@@ -362,7 +362,7 @@ def mock_engine(dialect_name=None):
return engine
-class DBAPIProxyCursor(object):
+class DBAPIProxyCursor:
"""Proxy a DBAPI cursor.
Tests can provide subclasses of this to intercept
@@ -391,7 +391,7 @@ class DBAPIProxyCursor(object):
return getattr(self.cursor, key)
-class DBAPIProxyConnection(object):
+class DBAPIProxyConnection:
"""Proxy a DBAPI connection.
Tests can provide subclasses of this to intercept
diff --git a/lib/sqlalchemy/testing/entities.py b/lib/sqlalchemy/testing/entities.py
index 9daa5c61f..15b6388fb 100644
--- a/lib/sqlalchemy/testing/entities.py
+++ b/lib/sqlalchemy/testing/entities.py
@@ -12,7 +12,7 @@ from ..util import compat
_repr_stack = set()
-class BasicEntity(object):
+class BasicEntity:
def __init__(self, **kw):
for key, value in kw.items():
setattr(self, key, value)
@@ -39,7 +39,7 @@ class BasicEntity(object):
_recursion_stack = set()
-class ComparableMixin(object):
+class ComparableMixin:
def __ne__(self, other):
return not self.__eq__(other)
diff --git a/lib/sqlalchemy/testing/exclusions.py b/lib/sqlalchemy/testing/exclusions.py
index e8fce5a4c..7b2343128 100644
--- a/lib/sqlalchemy/testing/exclusions.py
+++ b/lib/sqlalchemy/testing/exclusions.py
@@ -31,7 +31,7 @@ def fails_if(predicate, reason=None):
return rule
-class compound(object):
+class compound:
def __init__(self):
self.fails = set()
self.skips = set()
@@ -186,7 +186,7 @@ def succeeds_if(predicate, reason=None):
return fails_if(NotPredicate(predicate), reason)
-class Predicate(object):
+class Predicate:
@classmethod
def as_predicate(cls, predicate, description=None):
if isinstance(predicate, compound):
diff --git a/lib/sqlalchemy/testing/fixtures.py b/lib/sqlalchemy/testing/fixtures.py
index 1899e5b7c..d5e8e376a 100644
--- a/lib/sqlalchemy/testing/fixtures.py
+++ b/lib/sqlalchemy/testing/fixtures.py
@@ -26,7 +26,7 @@ from ..schema import sort_tables_and_constraints
@config.mark_base_test_class()
-class TestBase(object):
+class TestBase:
# A sequence of requirement names matching testing.requires decorators
__requires__ = ()
@@ -299,7 +299,7 @@ class TestBase(object):
_connection_fixture_connection = None
-class FutureEngineMixin(object):
+class FutureEngineMixin:
"""alembic's suite still using this"""
@@ -504,7 +504,7 @@ class TablesTest(TestBase):
)
-class NoCache(object):
+class NoCache:
@config.fixture(autouse=True, scope="function")
def _disable_cache(self):
_cache = config.db._compiled_cache
@@ -513,7 +513,7 @@ class NoCache(object):
config.db._compiled_cache = _cache
-class RemovesEvents(object):
+class RemovesEvents:
@util.memoized_property
def _event_fns(self):
return set()
@@ -704,7 +704,7 @@ class DeclarativeMappedTest(MappedTest):
cls_registry[classname] = cls
DeclarativeMeta.__init__(cls, classname, bases, dict_)
- class DeclarativeBasic(object):
+ class DeclarativeBasic:
__table_cls__ = schema.Table
_DeclBase = declarative_base(
diff --git a/lib/sqlalchemy/testing/pickleable.py b/lib/sqlalchemy/testing/pickleable.py
index 430cb5fb6..cf11ab03d 100644
--- a/lib/sqlalchemy/testing/pickleable.py
+++ b/lib/sqlalchemy/testing/pickleable.py
@@ -45,13 +45,13 @@ class Parent(fixtures.ComparableEntity):
pass
-class Screen(object):
+class Screen:
def __init__(self, obj, parent=None):
self.obj = obj
self.parent = parent
-class Foo(object):
+class Foo:
def __init__(self, moredata, stuff="im stuff"):
self.data = "im data"
self.stuff = stuff
@@ -67,7 +67,7 @@ class Foo(object):
)
-class Bar(object):
+class Bar:
def __init__(self, x, y):
self.x = x
self.y = y
@@ -104,7 +104,7 @@ class OldSchoolWithoutCompare:
self.y = y
-class BarWithoutCompare(object):
+class BarWithoutCompare:
def __init__(self, x, y):
self.x = x
self.y = y
@@ -113,7 +113,7 @@ class BarWithoutCompare(object):
return "Bar(%d, %d)" % (self.x, self.y)
-class NotComparable(object):
+class NotComparable:
def __init__(self, data):
self.data = data
@@ -127,7 +127,7 @@ class NotComparable(object):
return NotImplemented
-class BrokenComparable(object):
+class BrokenComparable:
def __init__(self, data):
self.data = data
diff --git a/lib/sqlalchemy/testing/plugin/plugin_base.py b/lib/sqlalchemy/testing/plugin/plugin_base.py
index d2e4a0f69..b382e97f6 100644
--- a/lib/sqlalchemy/testing/plugin/plugin_base.py
+++ b/lib/sqlalchemy/testing/plugin/plugin_base.py
@@ -38,7 +38,7 @@ else:
import ConfigParser as configparser
import collections as collections_abc # noqa
- class ABC(object):
+ class ABC:
__metaclass__ = abc.ABCMeta
diff --git a/lib/sqlalchemy/testing/profiling.py b/lib/sqlalchemy/testing/profiling.py
index 10344c8d6..b6a6e75b1 100644
--- a/lib/sqlalchemy/testing/profiling.py
+++ b/lib/sqlalchemy/testing/profiling.py
@@ -55,7 +55,7 @@ def _start_current_test(id_):
_profile_stats.reset_count()
-class ProfileStatsFile(object):
+class ProfileStatsFile:
"""Store per-platform/fn profiling results in a file.
There was no json module available when this was written, but now
diff --git a/lib/sqlalchemy/testing/provision.py b/lib/sqlalchemy/testing/provision.py
index a911ba69c..15613957c 100644
--- a/lib/sqlalchemy/testing/provision.py
+++ b/lib/sqlalchemy/testing/provision.py
@@ -17,7 +17,7 @@ log = logging.getLogger(__name__)
FOLLOWER_IDENT = None
-class register(object):
+class register:
def __init__(self):
self.fns = {}
diff --git a/lib/sqlalchemy/testing/requirements.py b/lib/sqlalchemy/testing/requirements.py
index 43849efca..325c0a9bb 100644
--- a/lib/sqlalchemy/testing/requirements.py
+++ b/lib/sqlalchemy/testing/requirements.py
@@ -25,7 +25,7 @@ from .. import util
from ..pool import QueuePool
-class Requirements(object):
+class Requirements:
pass
diff --git a/lib/sqlalchemy/testing/schema.py b/lib/sqlalchemy/testing/schema.py
index 9b5546ce7..60ea5284f 100644
--- a/lib/sqlalchemy/testing/schema.py
+++ b/lib/sqlalchemy/testing/schema.py
@@ -88,7 +88,7 @@ def Column(*args, **kw):
return col
-class eq_type_affinity(object):
+class eq_type_affinity:
"""Helper to compare types inside of datastructures based on affinity.
E.g.::
@@ -125,7 +125,7 @@ class eq_type_affinity(object):
return self.target._type_affinity is not other._type_affinity
-class eq_clause_element(object):
+class eq_clause_element:
"""Helper to compare SQL structures based on compare()"""
def __init__(self, target):
diff --git a/lib/sqlalchemy/testing/suite/test_types.py b/lib/sqlalchemy/testing/suite/test_types.py
index aa796df76..4a5396ed8 100644
--- a/lib/sqlalchemy/testing/suite/test_types.py
+++ b/lib/sqlalchemy/testing/suite/test_types.py
@@ -45,7 +45,7 @@ from ...orm import Session
from ...util import u
-class _LiteralRoundTripFixture(object):
+class _LiteralRoundTripFixture:
supports_whereclause = True
@testing.fixture