From 2f2ec54e2cd4fa1c6a4297cf0af04c4a260bc7f8 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 29 Dec 2025 22:01:26 +0530 Subject: [PATCH] Some more test closures --- src/calibre/db/tests/writing.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/db/tests/writing.py b/src/calibre/db/tests/writing.py index 8937c17e41..01879f6fc0 100644 --- a/src/calibre/db/tests/writing.py +++ b/src/calibre/db/tests/writing.py @@ -719,12 +719,14 @@ class WritingTest(BaseTest): cache = self.init_cache() cache.create_custom_column('tc', 'TC', 'composite', False, display={ 'composite_template':'{title} {author_sort} {title_sort} {formats} {tags} {series} {series_index}'}) + cache.close() cache = self.init_cache() def test_invalidate(): c = self.init_cache() for bid in cache.all_book_ids(): self.assertEqual(cache.field_for('#tc', bid), c.field_for('#tc', bid)) + c.close() cache.set_field('title', {1:'xx', 3:'yy'}) test_invalidate() @@ -740,6 +742,7 @@ class WritingTest(BaseTest): test_invalidate() cache.add_format(1, 'ADD', BytesIO(b'xxxx')) test_invalidate() + cache.close() # }}} def test_dump_and_restore(self): # {{{