Skip to content

Commit

Permalink
test: fix monkeypatch; fixes #166
Browse files Browse the repository at this point in the history
  • Loading branch information
aaraney committed Aug 22, 2024
1 parent 1bb2a5f commit afb30b9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/ngen_cal/tests/test_calibration_catchment.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ def test_output(
"""
import pandas as pd

monkeypatch.setattr(pd, "read_csv", lambda *args, **kwargs: FileNotFoundError())
def file_not_found(*args, **kwargs):
raise FileNotFoundError

monkeypatch.setattr(pd, "read_csv", file_not_found)
output = catchment2.output
assert output is None

Expand Down

0 comments on commit afb30b9

Please sign in to comment.