From ffc375d1f02205838485dd1e3e181037b2c0a580 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 22 Feb 2020 10:22:18 -0500 Subject: Repair inline flag In 9fca5d827d we attempted to deprecate the "inline=True" flag and add a generative inline() method, however failed to include any tests and the method was implemented incorrectly such that it would get overwritten with the boolean flag immediately. Rename the internal "inline" flag to "_inline" and add test support both for the method as well as deprecated support for the flag, including a fixture addition to assert the expected value of the flag as it generally does not affect the actual compiled SQL string. Change-Id: I0450049f17f1f0d91e22d27f1a973a2b6c0e59f7 --- test/sql/test_insert_exec.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/sql/test_insert_exec.py') diff --git a/test/sql/test_insert_exec.py b/test/sql/test_insert_exec.py index 2021c030c..9f9525f3c 100644 --- a/test/sql/test_insert_exec.py +++ b/test/sql/test_insert_exec.py @@ -338,7 +338,7 @@ class InsertExecTest(fixtures.TablesTest): class TableInsertTest(fixtures.TablesTest): """test for consistent insert behavior across dialects - regarding the inline=True flag, lower-case 't' tables. + regarding the inline() method, lower-case 't' tables. """ @@ -410,7 +410,7 @@ class TableInsertTest(fixtures.TablesTest): def test_uppercase_inline(self): t = self.tables.foo self._test( - t.insert(inline=True).values(id=1, data="data", x=5), + t.insert().inline().values(id=1, data="data", x=5), (1, "data", 5), inserted_primary_key=[1], ) @@ -422,7 +422,7 @@ class TableInsertTest(fixtures.TablesTest): def test_uppercase_inline_implicit(self): t = self.tables.foo self._test( - t.insert(inline=True).values(data="data", x=5), + t.insert().inline().values(data="data", x=5), (1, "data", 5), inserted_primary_key=[None], ) @@ -501,7 +501,7 @@ class TableInsertTest(fixtures.TablesTest): def test_implicit_pk_inline(self): t = self._fixture() self._test( - t.insert(inline=True).values(data="data", x=5), + t.insert().inline().values(data="data", x=5), (1, "data", 5), inserted_primary_key=[], ) -- cgit v1.2.1