Skip to content

Commit

Permalink
fixed tests/test_oxidation.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mpecchi committed May 9, 2024
1 parent 433c4f6 commit ad3e867
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions tests/test_oxidation.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,13 @@ def test_oxidation_with_temperature(test_dir, temp_symbol):
cell_ox5.oxidation_analysis()
cell_ox10.oxidation_analysis()
if temp_symbol == "K":
assert abs(cell_ox5.temp_i.ave() - 543.3366666666667) <= threshold
assert abs(cell_ox5.temp_b.ave() - 785.15) <= threshold
assert abs(cell_ox10.temp_i.ave() - 549.3166666666666) <= threshold
assert abs(cell_ox10.temp_b.ave() - 796.9333333333334) <= threshold
conv = +273.15
else:
assert abs(cell_ox5.temp_i.ave() - 543.3366666666667 + 273.15) <= threshold
assert abs(cell_ox5.temp_b.ave() - 785.15 + 273.15) <= threshold
assert abs(cell_ox10.temp_i.ave() - 549.3166666666666 + 273.15) <= threshold
assert abs(cell_ox10.temp_b.ave() - 796.9333333333334 + 273.15) <= threshold
conv = 0
np.testing.assert_allclose(cell_ox5.temp_i.ave(), 270.18666666666667 + conv)
np.testing.assert_allclose(cell_ox5.temp_b.ave(), 512.0 + conv)
np.testing.assert_allclose(cell_ox10.temp_i.ave(), 276.1666666666667 + conv)
np.testing.assert_allclose(cell_ox10.temp_b.ave(), 523.7833333333333 + conv)


# %%

0 comments on commit ad3e867

Please sign in to comment.