summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/util.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-08-28 17:57:48 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2014-08-28 17:57:48 -0400
commitfa5522547150687c9b3cd41d28df08ab0512b5b2 (patch)
tree7190563b7a1c282a6b2bde3414a58a54e5e2ee56 /lib/sqlalchemy/testing/util.py
parent9f4caf97b0172065fdf0f6da8f073d72abf8fd84 (diff)
downloadsqlalchemy-fa5522547150687c9b3cd41d28df08ab0512b5b2.tar.gz
- Made a small adjustment to the mechanics of lazy loading,
such that it has less chance of interfering with a joinload() in the very rare circumstance that an object points to itself; in this scenario, the object refers to itself while loading its attributes which can cause a mixup between loaders. The use case of "object points to itself" is not fully supported, but the fix also removes some overhead so for now is part of testing. fixes #3145
Diffstat (limited to 'lib/sqlalchemy/testing/util.py')
-rw-r--r--lib/sqlalchemy/testing/util.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/testing/util.py b/lib/sqlalchemy/testing/util.py
index fc8390a79..7b3f721a6 100644
--- a/lib/sqlalchemy/testing/util.py
+++ b/lib/sqlalchemy/testing/util.py
@@ -203,5 +203,7 @@ class adict(dict):
except KeyError:
return dict.__getattribute__(self, key)
- def get_all(self, *keys):
+ def __call__(self, *keys):
return tuple([self[key] for key in keys])
+
+ get_all = __call__