Skip to content

Commit

Permalink
Update teardown methods
Browse files Browse the repository at this point in the history
  • Loading branch information
kavanase committed Sep 9, 2024
1 parent 31795f3 commit 2ef5ee1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 [
Expand Down Expand Up @@ -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):
Expand Down
2 changes: 2 additions & 0 deletions tests/test_vasp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2ef5ee1

Please sign in to comment.