From 2ef5ee12e4ddbc9535793dc96f3464988a00d947 Mon Sep 17 00:00:00 2001 From: Sean Kavanagh Date: Mon, 9 Sep 2024 19:45:19 -0400 Subject: [PATCH] Update teardown methods --- tests/test_analysis.py | 7 +++++++ tests/test_vasp.py | 2 ++ 2 files changed, 9 insertions(+) diff --git a/tests/test_analysis.py b/tests/test_analysis.py index 5283466d..847c058b 100644 --- a/tests/test_analysis.py +++ b/tests/test_analysis.py @@ -2511,6 +2511,9 @@ def tearDown(self): if_present_rm(os.path.join(self.Cu2SiSe3_EXAMPLE_DIR, "Cu2SiSe3_defect_dict.json.gz")) if_present_rm(os.path.join(self.Cu2SiSe3_EXAMPLE_DIR, "bulk/vasp_std/voronoi_nodes.json")) + if_present_rm(os.path.join(self.ZnS_DATA_DIR, "ZnS_defect_dict.json.gz")) + if_present_rm(os.path.join(self.ZnS_DATA_DIR, "bulk/voronoi_nodes.json")) + def test_defect_name_from_structures(self): # by proxy also tests defect_from_structures for defect_gen_name in [ @@ -3362,6 +3365,10 @@ def setUp(self): self.CdTe_corrections_dir = os.path.join(self.module_path, "data/CdTe_charge_correction_tests") self.v_Cd_m2_path = f"{self.CdTe_corrections_dir}/v_Cd_-2_vasp_gam" self.CdTe_dielectric = np.array([[9.13, 0, 0], [0.0, 9.13, 0], [0, 0, 9.13]]) # CdTe + self.CdTe_BULK_DATA_DIR = os.path.join(self.CdTe_EXAMPLE_DIR, "CdTe_bulk/vasp_ncl") + + def tearDown(self): + if_present_rm(os.path.join(self.CdTe_BULK_DATA_DIR, "voronoi_nodes.json")) @custom_mpl_image_compare(filename="CdTe_v_cd_m2_eigenvalue_plot.png") def test_parsing_cdte(self): diff --git a/tests/test_vasp.py b/tests/test_vasp.py index 1207e9d9..6dcbc0dd 100644 --- a/tests/test_vasp.py +++ b/tests/test_vasp.py @@ -1133,6 +1133,8 @@ def tearDown(self): if_present_rm(folder) if_present_rm("AgSbTe2_test") + if_present_rm("CdTe_defects_generator.json") + if_present_rm("test_CdTe_defects_generator.json") def check_generated_vasp_inputs( self,