Skip to content

Commit

Permalink
Use sqlite3.Error parent class for 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
disinvite committed Jan 27, 2025
1 parent 4aaba40 commit e202c96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_compare_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def test_batch_sqlite_exception(db):
# Insert bad data that will cause a binding error
batch.match(100, ("bogus",))

with pytest.raises(sqlite3.ProgrammingError):
with pytest.raises(sqlite3.Error):
batch.commit()

# Should rollback everything
Expand All @@ -340,7 +340,7 @@ def test_batch_sqlite_exception_insert_only(db):
batch.insert_orig(100, name="Test")
batch.insert_orig(("bogus",), name="Test")

with pytest.raises(sqlite3.ProgrammingError):
with pytest.raises(sqlite3.Error):
batch.commit()

assert db.get_by_orig(100) is None

0 comments on commit e202c96

Please sign in to comment.