Skip to content

Commit

Permalink
test: fix monkey patch import path
Browse files Browse the repository at this point in the history
  • Loading branch information
aaraney committed Aug 6, 2024
1 parent 0189079 commit 62370dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/ngen_cal/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ def catchment(nexus, fabric, workdir, mocker) -> Generator[CalibrationCatchment,
output = nexus._hydro_location.get_data().rename(columns={'value':'sim_flow'})
output.set_index('value_time', inplace=True)
#Override the output property so it doesn't try to reload output each time
mocker.patch(__name__+'.EvaluatableCatchment.output',
mocker.patch('ngen.cal.calibration_cathment.EvaluatableCatchment.output',
new_callable=mocker.PropertyMock,
return_value = output
)
#Disable output saving for testing purpose
mocker.patch(__name__+'.AdjustableCatchment.save_output',
mocker.patch('ngen.cal.calibration_cathment.AdjustableCatchment.save_output',
return_value=None)

id = 'tst-1'
Expand Down Expand Up @@ -217,4 +217,4 @@ def explicit_catchments(nexus, fabric, workdir) -> Generator[ List[ CalibrationC
id = f"tst-{i}"
cat = CalibrationCatchment(workdir, id, nexus, start, end, fabric, 'Q_Out', eval_options, data)
catchments.append(cat)
yield catchments
yield catchments

0 comments on commit 62370dc

Please sign in to comment.