Skip to content

Commit e19b6aa

Browse files
committed
Work around session.diff attach
It was auto-attaching in 3.49 and shouldn't have been (fixed in 3.50)
1 parent 31f5dfb commit e19b6aa

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

apsw/tests/sessiontests.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,17 +144,12 @@ def testSessionDiff(self):
144144
""")
145145

146146
session = apsw.Session(self.db, "main")
147+
session.attach("zebra")
147148

148-
needs_attach = apsw.SQLITE_VERSION_NUMBER < 3050000
149-
150-
# errors
151-
if needs_attach:
152-
session.attach("zebra")
153-
self.assertRaises(apsw.SchemaChangeError, session.diff, "zebra", "zebra")
149+
self.assertRaises(apsw.SQLError, session.diff, "zebra", "zebra")
154150
self.assertRaises(apsw.SchemaChangeError, session.diff, "another", "zebra")
155151

156-
if needs_attach:
157-
session.attach("t")
152+
session.attach("t")
158153
self.assertRaisesRegex(apsw.SchemaChangeError, ".*table schemas do not match.*", session.diff, "other", "t")
159154

160155
session.diff("another", "t")

0 commit comments

Comments
 (0)