summaryrefslogtreecommitdiff
path: root/test/sql/test_insert.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/sql/test_insert.py')
-rw-r--r--test/sql/test_insert.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/sql/test_insert.py b/test/sql/test_insert.py
index c7749e74c..e5f2fbe6d 100644
--- a/test/sql/test_insert.py
+++ b/test/sql/test_insert.py
@@ -936,11 +936,25 @@ class EmptyTest(_InsertTestBase, fixtures.TablesTest, AssertsCompiledSQL):
dialect = default.DefaultDialect()
dialect.supports_empty_insert = dialect.supports_default_values = True
- stmt = table1.insert().values({}) # hide from 2to3
+ stmt = table1.insert().values({})
self.assert_compile(
stmt, "INSERT INTO mytable DEFAULT VALUES", dialect=dialect
)
+ def test_supports_empty_insert_true_executemany_mode(self):
+ table1 = self.tables.mytable
+
+ dialect = default.DefaultDialect()
+ dialect.supports_empty_insert = dialect.supports_default_values = True
+
+ stmt = table1.insert().values({})
+ self.assert_compile(
+ stmt,
+ "INSERT INTO mytable (myid) VALUES (DEFAULT)",
+ dialect=dialect,
+ for_executemany=True,
+ )
+
def test_supports_empty_insert_false(self):
table1 = self.tables.mytable