Ignore deprecation warning from apsw

This commit is contained in:
Kovid Goyal 2021-12-13 22:19:04 +05:30
parent f01268b2ec
commit aed39272af
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -651,6 +651,10 @@ class WritingTest(BaseTest):
def test_dump_and_restore(self): # {{{ def test_dump_and_restore(self): # {{{
' Test roundtripping the db through SQL ' ' Test roundtripping the db through SQL '
import warnings
with warnings.catch_warnings():
# on python 3.10 apsw raises a deprecation warning which causes this test to fail on CI
warnings.simplefilter('ignore', DeprecationWarning)
cache = self.init_cache() cache = self.init_cache()
uv = int(cache.backend.user_version) uv = int(cache.backend.user_version)
all_ids = cache.all_book_ids() all_ids = cache.all_book_ids()