summaryrefslogtreecommitdiff
path: root/test/sql/test_selectable.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2019-07-02 18:16:38 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2019-07-02 18:16:38 -0400
commit9b52c8ae927ae2628dcc1763d2e31245285f4d88 (patch)
tree9294132311ec8bd72a4247bef033ea0cef97b366 /test/sql/test_selectable.py
parent6636cd9d256ccbad651eba6553ec46391380cc93 (diff)
downloadsqlalchemy-9b52c8ae927ae2628dcc1763d2e31245285f4d88.tar.gz
Rework proxy_cache fix to restore performance
Adjustment to the fix made in I7fb134cac3604f8fe62e220fb24a0945d0a1c56f. Fixes: #4747 Change-Id: I2f1010b0abc1faa892f5e346e58f9c4a3867622f
Diffstat (limited to 'test/sql/test_selectable.py')
-rw-r--r--test/sql/test_selectable.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/test/sql/test_selectable.py b/test/sql/test_selectable.py
index 1a53cd1d6..230b5423b 100644
--- a/test/sql/test_selectable.py
+++ b/test/sql/test_selectable.py
@@ -1965,7 +1965,23 @@ class AnnotationsTest(fixtures.TestBase):
# proxy_set, as corresponding_column iterates through proxy_set
# in this way
d = {}
- for col in p2.proxy_set:
+ for col in p2._uncached_proxy_set():
+ d.update(col._annotations)
+ eq_(d, {"weight": 10})
+
+ def test_proxy_set_iteration_includes_annotated_two(self):
+ from sqlalchemy.schema import Column
+
+ c1 = Column("foo", Integer)
+
+ stmt = select([c1]).alias()
+ proxy = stmt.c.foo
+ c1.proxy_set
+
+ proxy._proxies = [c1._annotate({"weight": 10})]
+
+ d = {}
+ for col in proxy._uncached_proxy_set():
d.update(col._annotations)
eq_(d, {"weight": 10})