Skip to content

Commit

Permalink
Account for header row
Browse files Browse the repository at this point in the history
  • Loading branch information
jlaw9 authored Jul 11, 2023
1 parent 99423b4 commit c5cc9c4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/test_molecule_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@ def test_csv_writer(ray_init, caplog):
with open(Path(tempdir, "test.csv")) as f:
csvdata = list(csv.reader(f))

assert csvdata[0][0] == "CCC"
assert np.isclose(float(csvdata[0][1]), 0.3854706587740357)
# start at the second row to account for the header row
assert csvdata[1][0] == "CCC"
assert np.isclose(float(csvdata[1][1]), 0.3854706587740357)

assert csvdata[1][0] == "CCO"
assert np.isclose(float(csvdata[1][1]), 0.40680796565539457)
assert csvdata[2][0] == "CCO"
assert np.isclose(float(csvdata[2][1]), 0.40680796565539457)

0 comments on commit c5cc9c4

Please sign in to comment.