From 655c9c950cd751c1851132b7cfe734d28bee3fb8 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 26 Jun 2020 12:45:37 +0530 Subject: [PATCH] Skip legacy db test when python sqlite3 module does not have FTS support --- src/calibre/db/tests/legacy.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/calibre/db/tests/legacy.py b/src/calibre/db/tests/legacy.py index 30a4656c31..af95b0ea76 100644 --- a/src/calibre/db/tests/legacy.py +++ b/src/calibre/db/tests/legacy.py @@ -344,6 +344,14 @@ class LegacyTest(BaseTest): def test_legacy_adding_books(self): # {{{ 'Test various adding/deleting books methods' + import sqlite3 + con = sqlite3.connect(":memory:") + try: + con.execute("create virtual table recipe using fts5(name, ingredients)") + except Exception: + self.skipTest('python sqlite3 module does not have FTS5 support') + con.close() + del con from calibre.ebooks.metadata.book.base import Metadata from calibre.ptempfile import TemporaryFile legacy, old = self.init_legacy(self.cloned_library), self.init_old(self.cloned_library)