diff options
Diffstat (limited to 'test/sql')
| -rw-r--r-- | test/sql/test_compiler.py | 10 | ||||
| -rw-r--r-- | test/sql/test_update.py | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/test/sql/test_compiler.py b/test/sql/test_compiler.py index 25aa78b03..b1c807df6 100644 --- a/test/sql/test_compiler.py +++ b/test/sql/test_compiler.py @@ -2082,6 +2082,10 @@ class SelectTest(fixtures.TestBase, AssertsCompiledSQL): ) def test_naming(self): + # TODO: the part where we check c.keys() are not "compile" tests, they + # belong probably in test_selectable, or some broken up + # version of that suite + f1 = func.hoho(table1.c.name) s1 = select([table1.c.myid, table1.c.myid.label('foobar'), f1, @@ -2098,7 +2102,8 @@ class SelectTest(fixtures.TestBase, AssertsCompiledSQL): exprs = ( table1.c.myid == 12, func.hoho(table1.c.myid), - cast(table1.c.name, Numeric) + cast(table1.c.name, Numeric), + literal('x'), ) for col, key, expr, label in ( (table1.c.name, 'name', 'mytable.name', None), @@ -2108,7 +2113,8 @@ class SelectTest(fixtures.TestBase, AssertsCompiledSQL): 'CAST(mytable.name AS NUMERIC)', 'anon_1'), (t1.c.col1, 'col1', 'mytable.col1', None), (column('some wacky thing'), 'some wacky thing', - '"some wacky thing"', '') + '"some wacky thing"', ''), + (exprs[3], exprs[3].key, ":param_1", "anon_1") ): if getattr(col, 'table', None) is not None: t = col.table diff --git a/test/sql/test_update.py b/test/sql/test_update.py index 10306372b..a1b64d862 100644 --- a/test/sql/test_update.py +++ b/test/sql/test_update.py @@ -203,7 +203,7 @@ class UpdateTest(_UpdateFromTestBase, fixtures.TablesTest, AssertsCompiledSQL): """ table1 = self.tables.mytable expr = func.foo(table1.c.myid) - assert not hasattr(expr, 'key') + eq_(expr.key, None) self.assert_compile(table1.update().values({expr: 'bar'}), 'UPDATE mytable SET foo(myid)=:param_1') |
