From f1b0f221a0db5a8c1c866fe2abbc0356bd74b99f Mon Sep 17 00:00:00 2001 From: Travis Thurber Date: Fri, 23 Sep 2022 16:04:05 -0700 Subject: [PATCH] update test to use pkg resource file (#94) --- mosartwmpy/_version.py | 2 +- mosartwmpy/tests/test_calculate_water_constraints_by_farm.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mosartwmpy/_version.py b/mosartwmpy/_version.py index 6a9beea..3d26edf 100644 --- a/mosartwmpy/_version.py +++ b/mosartwmpy/_version.py @@ -1 +1 @@ -__version__ = "0.4.0" +__version__ = "0.4.1" diff --git a/mosartwmpy/tests/test_calculate_water_constraints_by_farm.py b/mosartwmpy/tests/test_calculate_water_constraints_by_farm.py index 2165f7e..9fb1614 100644 --- a/mosartwmpy/tests/test_calculate_water_constraints_by_farm.py +++ b/mosartwmpy/tests/test_calculate_water_constraints_by_farm.py @@ -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() @@ -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)