summaryrefslogtreecommitdiff
path: root/test/sql/test_selectable.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2016-01-19 16:47:16 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2016-01-19 16:47:16 -0500
commit39837686b068a6e7016169f31a96a058546e4bdd (patch)
tree736084283457941f22601f3afc4b58dadcd95edf /test/sql/test_selectable.py
parentb7bc704f3d05bed8d0771cbff65adcdb7b49f796 (diff)
downloadsqlalchemy-39837686b068a6e7016169f31a96a058546e4bdd.tar.gz
- calling str() on a core sql construct has been made more "friendly",
when the construct contains non-standard sql elements such as returning, array index operations, or dialect-specific or custom datatypes. a string is now returned in these cases rendering an approximation of the construct (typically the postgresql-style version of it) rather than raising an error. fixes #3631 - add within_group to top-level imports - add eq_ignore_whitespace to sqlalchemy.testing imports
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 b9cbbf480..7203cc5a3 100644
--- a/test/sql/test_selectable.py
+++ b/test/sql/test_selectable.py
@@ -155,15 +155,19 @@ class SelectableTest(
assert c in s.c.bar.proxy_set
def test_no_error_on_unsupported_expr_key(self):
- from sqlalchemy.dialects.postgresql import ARRAY
+ from sqlalchemy.sql.expression import BinaryExpression
- t = table('t', column('x', ARRAY(Integer)))
+ def myop(x, y):
+ pass
+
+ t = table('t', column('x'), column('y'))
+
+ expr = BinaryExpression(t.c.x, t.c.y, myop)
- expr = t.c.x[5]
s = select([t, expr])
eq_(
s.c.keys(),
- ['x', expr.anon_label]
+ ['x', 'y', expr.anon_label]
)
def test_cloned_intersection(self):