def test_potcar_stringlist_er(file_path): """ Test the potcar function to_stringlist for Erbium """ path = file_path('/Er/POTCAR') potcar = Potcar(path) with open(path, "r") as file: potcar_generated_lines = potcar.to_stringlist() for index, line in enumerate(file): assert line.strip() == potcar_generated_lines[index].strip()
def test_potcar_stringlist_si_lda(file_path): """ Test the potcar function to_stringlist for Silicium. The potcar uses LDA approximation. """ path = file_path('/Si/POTCAR_LDA') potcar = Potcar(path) with open(path, "r") as file: potcar_generated_lines = potcar.to_stringlist() for index, line in enumerate(file): assert line.strip() == potcar_generated_lines[index].strip()