diff --git a/frappe/printing/doctype/print_format/test_print_format.py b/frappe/printing/doctype/print_format/test_print_format.py index 0b53e1dd13..15e92c54a2 100644 --- a/frappe/printing/doctype/print_format/test_print_format.py +++ b/frappe/printing/doctype/print_format/test_print_format.py @@ -51,4 +51,7 @@ class TestPrintFormat(unittest.TestCase): for key, value in exported_doc.items(): if key in doc_dict: - self.assertEqual(value, doc_dict[key]) + with self.subTest(key=key): + self.assertEqual(value, doc_dict[key]) + + self.addCleanup(os.remove, exported_doc_path) diff --git a/frappe/tests/test_modules.py b/frappe/tests/test_modules.py index 4bda29e60e..6fe2fb3d3d 100644 --- a/frappe/tests/test_modules.py +++ b/frappe/tests/test_modules.py @@ -60,6 +60,7 @@ class TestUtils(FrappeTestCase): self.custom_field.delete() trim_table("Note", dry_run=False) delattr(self, "custom_field") + delete_path(frappe.get_module_path("Desk", "Note")) if self._testMethodName == "test_export_doc": self.note.delete()