Skip to content

Commit

Permalink
update test to use pkg resource file (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
thurber authored Sep 23, 2022
1 parent a8897ea commit f1b0f22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mosartwmpy/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.0"
__version__ = "0.4.1"
2 changes: 2 additions & 0 deletions mosartwmpy/tests/test_calculate_water_constraints_by_farm.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class CalculateWaterConstraintsByFarmTest(unittest.TestCase):
RUNOFF_FILE = pkg_resources.resource_filename('mosartwmpy', 'tests/runoff_1981_01_01.nc')
DEMAND_FILE = pkg_resources.resource_filename('mosartwmpy', 'tests/demand_1981_01_01.nc')
RESERVOIRS_FILE = pkg_resources.resource_filename('mosartwmpy', 'tests/reservoirs.nc')
CONSTRAINTS_FILE = pkg_resources.resource_filename('mosartwmpy', 'tests/test_land_water_constraints_by_farm.parquet')

def test_calculate_water_constraints_by_farm(self):
model = Model()
Expand All @@ -24,6 +25,7 @@ def test_calculate_water_constraints_by_farm(self):
model.config['runoff.path'] = self.RUNOFF_FILE
model.config['water_management.demand.path'] = self.DEMAND_FILE
model.config['water_management.reservoirs.path'] = self.RESERVOIRS_FILE
model.config['water_management.demand.farmer_abm.land_water_constraints.path'] = self.CONSTRAINTS_FILE

farmerABM = FarmerABM(model)

Expand Down

0 comments on commit f1b0f22

Please sign in to comment.