]> granicus.if.org Git - python/commitdiff
Made sqlite3 module's regression tests work with SQLite versions that don't
authorGerhard Häring <gh@ghaering.de>
Sun, 2 Mar 2008 13:08:03 +0000 (13:08 +0000)
committerGerhard Häring <gh@ghaering.de>
Sun, 2 Mar 2008 13:08:03 +0000 (13:08 +0000)
support "create table if not exists", yet.

Lib/sqlite3/test/regression.py

index 45eae90554e706da854c8f579754ff9b7f53aeb9..2cc8f30e53e09cd67b62977888107a59f9e13a04 100644 (file)
@@ -115,8 +115,9 @@ class RegressionTests(unittest.TestCase):
         pysqlite would crash with older SQLite versions unless
         a workaround is implemented.
         """
-        self.con.execute("create table if not exists foo(bar)")
-        self.con.execute("create table if not exists foo(bar)")
+        self.con.execute("create table foo(bar)")
+        self.con.execute("drop table foo")
+        self.con.execute("create table foo(bar)")
 
     def CheckEmptyStatement(self):
         """