From 2f87507afe044fec373e914a195073b0d78d3f48 Mon Sep 17 00:00:00 2001 From: Karim shoair Date: Sat, 3 Jan 2026 22:02:03 +0200 Subject: [PATCH] test: update database test to suite windows --- tests/core/test_storage_core.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/core/test_storage_core.py b/tests/core/test_storage_core.py index 241ac0b..1827294 100644 --- a/tests/core/test_storage_core.py +++ b/tests/core/test_storage_core.py @@ -17,12 +17,16 @@ class TestSQLiteStorageSystem: """Test SQLite storage with an actual file""" with tempfile.NamedTemporaryFile(suffix='.db', delete=False) as tmp_file: db_path = tmp_file.name - + + storage = None try: storage = SQLiteStorageSystem(storage_file=db_path) assert storage is not None assert os.path.exists(db_path) finally: + # Close the database connection before deleting (required on Windows) + if storage is not None: + storage.close() if os.path.exists(db_path): os.unlink(db_path)