summaryrefslogtreecommitdiff
path: root/test/sql/test_compiler.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2016-03-02 20:24:49 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2016-03-02 20:24:49 -0500
commit6b7c207801d826db872aeda02e7c7b531df68034 (patch)
treeac5e2fcd14cee1adde8387a769cf37ba64fe7a31 /test/sql/test_compiler.py
parent3d83e1639e1325af67d2bba390bd7c40838380b9 (diff)
downloadsqlalchemy-6b7c207801d826db872aeda02e7c7b531df68034.tar.gz
- move out unconsumed names tests from test_compiler out to test_insert, test_update
- establish consistent names between existing unconsumed names tests and new ones added per ref #3666
Diffstat (limited to 'test/sql/test_compiler.py')
-rw-r--r--test/sql/test_compiler.py42
1 files changed, 0 insertions, 42 deletions
diff --git a/test/sql/test_compiler.py b/test/sql/test_compiler.py
index 041cd37b6..8e75638a2 100644
--- a/test/sql/test_compiler.py
+++ b/test/sql/test_compiler.py
@@ -2898,48 +2898,6 @@ class CRUDTest(fixtures.TestBase, AssertsCompiledSQL):
'x2': 1,
'y': 2})
- def test_unconsumed_names(self):
- t = table("t", column("x"), column("y"))
- t2 = table("t2", column("q"), column("z"))
- assert_raises_message(
- exc.CompileError,
- "Unconsumed column names: z",
- t.insert().values(x=5, z=5).compile,
- )
- assert_raises_message(
- exc.CompileError,
- "Unconsumed column names: z",
- t.update().values(x=5, z=5).compile,
- )
-
- assert_raises_message(
- exc.CompileError,
- "Unconsumed column names: j",
- t.update().values(x=5, j=7).values({t2.c.z: 5}).
- where(t.c.x == t2.c.q).compile,
- )
-
- # bindparam names don't get counted
- i = t.insert().values(x=3 + bindparam('x2'))
- self.assert_compile(
- i,
- "INSERT INTO t (x) VALUES ((:param_1 + :x2))"
- )
-
- # even if in the params list
- i = t.insert().values(x=3 + bindparam('x2'))
- self.assert_compile(
- i,
- "INSERT INTO t (x) VALUES ((:param_1 + :x2))",
- params={"x2": 1}
- )
-
- assert_raises_message(
- exc.CompileError,
- "Unconsumed column names: j",
- t.update().values(x=5, j=7).compile,
- column_keys=['j']
- )
def test_labels_no_collision(self):