Commits

Mike Bayer committed baba54b

don't INSERT a blank row if no rows passed. (breaks all the tests for SQLite on the buildbot....)

Comments (0)

Files changed (1)

test/orm/_fixtures.py

 def fixture_table(table, columns, *rows):
     def load_fixture(bind=None):
         bind = bind or table.bind
-        bind.execute(
-            table.insert(),
-            [dict(zip(columns, column_values)) for column_values in rows])
+        if rows:
+            bind.execute(
+                table.insert(),
+                [dict(zip(columns, column_values)) for column_values in rows])
     table.info[('fixture', 'loader')] = load_fixture
     table.info[('fixture', 'columns')] = columns
     table.info[('fixture', 'rows')] = rows