diff options
author | Erlend Egeberg Aasland <erlend.aasland@innova.no> | 2021-04-14 11:45:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-14 11:45:49 (GMT) |
commit | c1ae7419975f7d664320f66ea3acc8663bbf76cf (patch) | |
tree | e3d7a709c3c2ec93343169fa66f01ffa171c524b /Lib/sqlite3 | |
parent | b8509ffa82d393d9d4a0f5520edca057978bbd86 (diff) | |
download | cpython-c1ae7419975f7d664320f66ea3acc8663bbf76cf.zip cpython-c1ae7419975f7d664320f66ea3acc8663bbf76cf.tar.gz cpython-c1ae7419975f7d664320f66ea3acc8663bbf76cf.tar.bz2 |
bpo-43265: Improve sqlite3.Connection.backup error handling (GH-24586)
Diffstat (limited to 'Lib/sqlite3')
-rw-r--r-- | Lib/sqlite3/test/backup.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/sqlite3/test/backup.py b/Lib/sqlite3/test/backup.py index cbe24df..4e30594 100644 --- a/Lib/sqlite3/test/backup.py +++ b/Lib/sqlite3/test/backup.py @@ -149,10 +149,7 @@ class BackupTests(unittest.TestCase): with self.assertRaises(sqlite.OperationalError) as cm: with sqlite.connect(':memory:') as bck: self.cx.backup(bck, name='non-existing') - self.assertIn( - str(cm.exception), - ['SQL logic error', 'SQL logic error or missing database'] - ) + self.assertIn("unknown database", str(cm.exception)) self.cx.execute("ATTACH DATABASE ':memory:' AS attached_db") self.cx.execute('CREATE TABLE attached_db.foo (key INTEGER)') |