Skip to content

Commit

Permalink
relax water constraint test to support small variations from dependen…
Browse files Browse the repository at this point in the history
…cy versions (#100)
  • Loading branch information
thurber authored Dec 29, 2022
1 parent 1fca428 commit 6ad55bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mosartwmpy/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.5.0"
__version__ = "0.5.1"
7 changes: 6 additions & 1 deletion mosartwmpy/tests/test_calculate_water_constraints_by_farm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import unittest
import numpy as np
import pandas as pd
import pkg_resources

Expand Down Expand Up @@ -65,7 +66,11 @@ def test_calculate_water_constraints_by_farm(self):
90: 1867.5493916929483, 91: 871.2380665376529, 92: 551.7301491571899, 93: 12.085666626862842, 94: 0.0, 95: 0.0,
96: 2.757034402743735, 97: 2.059543992483289, 98: 0.0, 99: 0.0}

self.assertEqual(water_constraints_by_farm, expected)
np.testing.assert_almost_equal(
np.array(list(water_constraints_by_farm.values())),
np.array(list(expected.values())),
2
)


if __name__ == '__main__':
Expand Down

0 comments on commit 6ad55bc

Please sign in to comment.