https://github.com/python/cpython/commit/98655cec0e5c11ee28c8c67e446747e53d72d301
commit: 98655cec0e5c11ee28c8c67e446747e53d72d301
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: erlend-aasland <[email protected]>
date: 2024-10-13T20:47:38+02:00
summary:

[3.13] gh-123849: Fix test_sqlite3.test_table_dump when foreign keys are 
enabled by default (GH-123859) (#125163)

(cherry picked from commit 14b44c58e195c4cdee6594a4aacf8bf95b19fcd7)

Co-authored-by: Mariusz Felisiak <[email protected]>

files:
M Lib/test/test_sqlite3/test_dump.py

diff --git a/Lib/test/test_sqlite3/test_dump.py 
b/Lib/test/test_sqlite3/test_dump.py
index d508f238f84fb5..550cea41976441 100644
--- a/Lib/test/test_sqlite3/test_dump.py
+++ b/Lib/test/test_sqlite3/test_dump.py
@@ -10,6 +10,7 @@ class DumpTests(MemoryDatabaseMixin, unittest.TestCase):
 
     def test_table_dump(self):
         expected_sqls = [
+                "PRAGMA foreign_keys=OFF;",
                 """CREATE TABLE "index"("index" blob);"""
                 ,
                 """INSERT INTO "index" VALUES(X'01');"""
@@ -48,7 +49,7 @@ def test_table_dump(self):
         expected_sqls = [
             "PRAGMA foreign_keys=OFF;",
             "BEGIN TRANSACTION;",
-            *expected_sqls,
+            *expected_sqls[1:],
             "COMMIT;",
         ]
         [self.assertEqual(expected_sqls[i], actual_sqls[i])

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to