Skip to content

Commit f83e77f

Browse files
committed
Bug fix: Do not assume order of properties in pif
1 parent 5d78358 commit f83e77f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests/test_pif.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,15 @@ def test_VASP(self):
6868

6969
# Run the conversion, check that it returns some data
7070
result = convert([os.path.join('AlNi_static_LDA', 'OUTCAR')])
71-
self.assertEqual("Converged", result.properties[0].name)
72-
self.assertEqual(True, result.properties[0].scalars[0].value)
71+
72+
found = False
73+
for conv_value, prop in enumerate(result.properties):
74+
if prop.name == "Converged":
75+
found = True
76+
break
77+
78+
self.assertTrue(found)
79+
self.assertEqual(True, result.properties[conv_value].scalars[0].value)
7380

7481
delete_example('AlNi_static_LDA')
7582

0 commit comments

Comments
 (0)