mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
gh-123849: Fix test_sqlite3.test_table_dump when foreign keys are enabled by default (#123859)
This commit is contained in:
parent
37228bd16e
commit
14b44c58e1
1 changed files with 2 additions and 1 deletions
|
@ -10,6 +10,7 @@ class DumpTests(MemoryDatabaseMixin, unittest.TestCase):
|
||||||
|
|
||||||
def test_table_dump(self):
|
def test_table_dump(self):
|
||||||
expected_sqls = [
|
expected_sqls = [
|
||||||
|
"PRAGMA foreign_keys=OFF;",
|
||||||
"""CREATE TABLE "index"("index" blob);"""
|
"""CREATE TABLE "index"("index" blob);"""
|
||||||
,
|
,
|
||||||
"""INSERT INTO "index" VALUES(X'01');"""
|
"""INSERT INTO "index" VALUES(X'01');"""
|
||||||
|
@ -48,7 +49,7 @@ class DumpTests(MemoryDatabaseMixin, unittest.TestCase):
|
||||||
expected_sqls = [
|
expected_sqls = [
|
||||||
"PRAGMA foreign_keys=OFF;",
|
"PRAGMA foreign_keys=OFF;",
|
||||||
"BEGIN TRANSACTION;",
|
"BEGIN TRANSACTION;",
|
||||||
*expected_sqls,
|
*expected_sqls[1:],
|
||||||
"COMMIT;",
|
"COMMIT;",
|
||||||
]
|
]
|
||||||
[self.assertEqual(expected_sqls[i], actual_sqls[i])
|
[self.assertEqual(expected_sqls[i], actual_sqls[i])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue