summaryrefslogtreecommitdiff
path: root/test/lib/testing.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-03-26 19:03:11 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2011-03-26 19:03:11 -0400
commit14a2fae2398fb05f7ced56cec25e6f98307356f4 (patch)
tree6e7fde84f805d08659a96638b13edb08e681b5e9 /test/lib/testing.py
parentdfd2c0fb5e1780966d0d5dfdb3d783177640f78f (diff)
downloadsqlalchemy-14a2fae2398fb05f7ced56cec25e6f98307356f4.tar.gz
- remove @testing.resolve_artifact_names, replace with direct attribute
access to the cls/self.tables/classes registries - express orm/_base.py ORMTest in terms of engine/_base.py TablesTest, factor out common steps into TablesTest, remove AltEngineTest as a separate class. will further consolidate these base classes
Diffstat (limited to 'test/lib/testing.py')
-rw-r--r--test/lib/testing.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/test/lib/testing.py b/test/lib/testing.py
index bf852de7c..e4edb8a86 100644
--- a/test/lib/testing.py
+++ b/test/lib/testing.py
@@ -450,8 +450,6 @@ def global_cleanup_assertions():
testutil.lazy_gc()
assert not pool._refs
-
-
def against(*queries):
"""Boolean predicate, compares to testing database configuration.
@@ -563,32 +561,6 @@ def provide_metadata(fn, *args, **kw):
finally:
metadata.drop_all()
-@decorator
-def resolve_artifact_names(fn, *args, **kw):
- """Decorator, augment function globals with tables and classes.
-
- Swaps out the function's globals at execution time. The 'global' statement
- will not work as expected inside a decorated function.
-
- """
- # This could be automatically applied to framework and test_ methods in
- # the MappedTest-derived test suites but... *some* explicitness for this
- # magic is probably good. Especially as 'global' won't work- these
- # rebound functions aren't regular Python..
- #
- # Also: it's lame that CPython accepts a dict-subclass for globals, but
- # only calls dict methods. That would allow 'global' to pass through to
- # the func_globals.
- self = args[0]
- context = dict(fn.func_globals)
- for source in self._artifact_registries:
- context.update(getattr(self, source))
- # jython bug #1034
- rebound = types.FunctionType(
- fn.func_code, context, fn.func_name, fn.func_defaults,
- fn.func_closure)
- return rebound(*args, **kw)
-
class adict(dict):
"""Dict keys available as attributes. Shadows."""
def __getattribute__(self, key):