parent
12c9590524
commit
96bec9f9d7
@ -68,9 +68,9 @@ class SqliteError(SqlError):
|
|||||||
# https://github.com/qutebrowser/qutebrowser/issues/2930
|
# https://github.com/qutebrowser/qutebrowser/issues/2930
|
||||||
# https://github.com/qutebrowser/qutebrowser/issues/3004
|
# https://github.com/qutebrowser/qutebrowser/issues/3004
|
||||||
environmental_errors = [
|
environmental_errors = [
|
||||||
|
'5', # SQLITE_BUSY ("database is locked")
|
||||||
'8', # SQLITE_READONLY
|
'8', # SQLITE_READONLY
|
||||||
'9', # SQLITE_LOCKED,
|
'13', # SQLITE_FULL
|
||||||
'13', # SQLITE_FULL,
|
|
||||||
]
|
]
|
||||||
self.environmental = error.nativeErrorCode() in environmental_errors
|
self.environmental = error.nativeErrorCode() in environmental_errors
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ def test_sqlerror():
|
|||||||
class TestSqliteError:
|
class TestSqliteError:
|
||||||
|
|
||||||
@pytest.mark.parametrize('error_code, environmental', [
|
@pytest.mark.parametrize('error_code, environmental', [
|
||||||
('9', True), # SQLITE_LOCKED
|
('5', True), # SQLITE_BUSY
|
||||||
('19', False), # SQLITE_CONSTRAINT
|
('19', False), # SQLITE_CONSTRAINT
|
||||||
])
|
])
|
||||||
def test_environmental(self, error_code, environmental):
|
def test_environmental(self, error_code, environmental):
|
||||||
|
Loading…
Reference in New Issue
Block a user