summaryrefslogtreecommitdiff
path: root/test/sql/test_selectable.py
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2020-03-11 18:08:03 +0000
committerGerrit Code Review <gerrit@bbpush.zzzcomputing.com>2020-03-11 18:08:03 +0000
commit2aa9a8043b4982d4d7b53e8b11371ea27fccd09c (patch)
tree0fc1f0ddd3a6defdda5888ee48bd4e69bd162c4c /test/sql/test_selectable.py
parent59ca6e5fcc6974ea1fac82d05157aa58e550b332 (diff)
parent693938dd6fb2f3ee3e031aed4c62355ac97f3ceb (diff)
downloadsqlalchemy-2aa9a8043b4982d4d7b53e8b11371ea27fccd09c.tar.gz
Merge "Rework select(), CompoundSelect() in terms of CompileState"
Diffstat (limited to 'test/sql/test_selectable.py')
-rw-r--r--test/sql/test_selectable.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/sql/test_selectable.py b/test/sql/test_selectable.py
index cc2df16a9..30dfc0630 100644
--- a/test/sql/test_selectable.py
+++ b/test/sql/test_selectable.py
@@ -1133,12 +1133,14 @@ class SelectableTest(
s3 = sql_util.ClauseAdapter(ta).traverse(s2)
- assert s1 not in s3._froms
+ froms = list(s3._iterate_from_elements())
+
+ assert s1 not in froms
# these are new assumptions with the newer approach that
# actively swaps out whereclause and others
assert s3._whereclause.left.table is not s1
- assert s3._whereclause.left.table in s3._froms
+ assert s3._whereclause.left.table in froms
class RefreshForNewColTest(fixtures.TestBase):
@@ -2540,7 +2542,8 @@ class AnnotationsTest(fixtures.TestBase):
):
# the columns clause isn't changed at all
assert sel._raw_columns[0].table is a1
- assert sel._froms[0].element is sel._froms[1].left.element
+ froms = list(sel._iterate_from_elements())
+ assert froms[0].element is froms[1].left.element
eq_(str(s), str(sel))
@@ -2551,7 +2554,8 @@ class AnnotationsTest(fixtures.TestBase):
sql_util._deep_deannotate(s, {"foo": "bar"}),
sql_util._deep_annotate(s, {"foo": "bar"}),
):
- assert sel._froms[0] is not sel._froms[1].left
+ froms = list(sel._iterate_from_elements())
+ assert froms[0] is not froms[1].left
# but things still work out due to
# re49563072578