From 9831159653fb4c5784bb9db27db595f78e0530a1 Mon Sep 17 00:00:00 2001 From: Karsten Lehmann Date: Fri, 28 Aug 2020 20:09:59 +0200 Subject: [PATCH] Close whole collection instead of just the database --- tests/helpers/collection_utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/helpers/collection_utils.py b/tests/helpers/collection_utils.py index 10fcaf5..b8e1231 100644 --- a/tests/helpers/collection_utils.py +++ b/tests/helpers/collection_utils.py @@ -5,7 +5,6 @@ import tempfile from anki import Collection - class CollectionUtils: """ Provides utility methods for creating, inspecting and manipulating anki @@ -26,7 +25,7 @@ class CollectionUtils: file_path = os.path.join(self.tempdir, "collection.anki2") master_col = Collection(file_path) - master_col.db.close() + master_col.close() self.master_db_path = file_path def __enter__(self):