Skip to content

Commit

Permalink
Fix bad assertion in test_update_forecast_datasets
Browse files Browse the repository at this point in the history
Bad assertion was present for some time allowing test to always pass. Upgrading
to Python 3.12 revealed it with a test failure.
  • Loading branch information
douglatornell committed Nov 10, 2023
1 parent d3e5b28 commit 2763b2c
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions tests/workers/test_update_forecast_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,14 +650,25 @@ def test_wwatch3_symlink_forecast2_run(
run_type,
config,
)
assert m_symlink_results.called_once_with(
Path(f"opp/wwatch3/{run_type}"),
run_date,
new_forecast_dir,
run_date,
model,
run_type,
)
expected = [
call(
Path(f"/tmp/{model}_forecast"),
run_date,
new_forecast_dir,
run_date,
model,
run_type,
),
call(
Path(f"opp/wwatch3/{run_type}"),
run_date,
new_forecast_dir,
run_date.shift(days=+1),
model,
run_type,
),
]
m_symlink_results.assert_has_calls(expected)

@patch(
"nowcast.workers.update_forecast_datasets._extract_1st_forecast_day",
Expand Down

0 comments on commit 2763b2c

Please sign in to comment.