File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,12 @@ def test_move_flags(self):
2020
2121
2222class TestPOSCARMoveFlags (unittest .TestCase ):
23+ def setUp (self ):
24+ self .tmp_file = "POSCAR.tmp.1"
25+
26+ def tearDown (self ):
27+ if os .path .exists (self .tmp_file ):
28+ os .remove (self .tmp_file )
2329 def test_move_flags_error1 (self ):
2430 with self .assertRaisesRegex (RuntimeError , "Invalid move flags.*?" ):
2531 dpdata .System ().from_vasp_poscar (os .path .join ("poscars" , "POSCAR.oh.err1" ))
@@ -36,7 +42,7 @@ def test_move_flags_error3(self):
3642 with self .assertRaisesRegex (
3743 RuntimeError , "Invalid move flags:.*?should be a list of 3 bools"
3844 ):
39- system .to_vasp_poscar ("POSCAR.tmp.1" )
45+ system .to_vasp_poscar (self . tmp_file )
4046
4147
4248class TestPOSCARDirect (unittest .TestCase , TestPOSCARoh ):
You can’t perform that action at this time.
0 commit comments