diff --git a/test/test_codebook_to_pdf.py b/test/test_codebook_to_pdf.py
index ac030300984e7979e478a922c5e8441a5123aae9..5f4fe854723c35e9792fe5eee3819bf87a9070e6 100644
--- a/test/test_codebook_to_pdf.py
+++ b/test/test_codebook_to_pdf.py
@@ -61,3 +61,5 @@ def delete_generated_files(file_path1, file_path2):
         os.remove(file_path1)
     if os.path.exists(file_path2):
         os.remove(file_path2)
+    if os.path.exists(TESTDBPATH):
+        os.remove(TESTDBPATH)