From a132f837ce79b0c0f39aa2fb9e784ca82a32f0e0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 25 Sep 2025 07:56:46 +0530 Subject: [PATCH] Skip test when apsw is frozen without shell module --- src/calibre/db/tests/writing.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/calibre/db/tests/writing.py b/src/calibre/db/tests/writing.py index e43af82dc1..908c37097f 100644 --- a/src/calibre/db/tests/writing.py +++ b/src/calibre/db/tests/writing.py @@ -729,6 +729,13 @@ class WritingTest(BaseTest): def test_dump_and_restore(self): # {{{ ' Test roundtripping the db through SQL ' + try: + from apsw import shell + except Exception: + # apsw frozen without shell module + self.skipTest('apsw frozen without shell module') + return + del shell import warnings with warnings.catch_warnings(): # on python 3.10 apsw raises a deprecation warning which causes this test to fail on CI