Skip to content

Commit

Permalink
use poscar.get_string(significant_figures=4) for less flaky CI tests …
Browse files Browse the repository at this point in the history
…from floating point errors
  • Loading branch information
janosh committed Aug 26, 2022
1 parent c14681f commit be615b7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion atomate/vasp/firetasks/tests/test_write_vasp.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def setUpClass(cls):

def setUp(self):
super().setUp(lpad=False)
self.maxDiff = None

def tearDown(self):
for x in ["INCAR", "POSCAR", "POTCAR", "KPOINTS", "POTCAR.spec"]:
Expand All @@ -50,7 +51,10 @@ def _verify_files(
self.assertEqual(Incar.from_file("INCAR"), self.ref_incar)

poscar = Poscar.from_file("POSCAR")
self.assertEqual(str(poscar), str(self.ref_poscar))
self.assertEqual(
poscar.get_string(significant_figures=4),
self.ref_poscar.get_string(significant_figures=4),
)

if potcar_spec:
symbols = Path("POTCAR.spec").read_text().split()
Expand Down

0 comments on commit be615b7

Please sign in to comment.