Skip to content

Commit

Permalink
style: reformat code using Black and Ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharth7113 committed Jan 4, 2025
1 parent 024e8ce commit 0424255
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/test_real_forecasts.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,20 @@ def test_real_forecasts(db_session, test_config):
for forecast in forecasts:
print(f"ForecastSQL Object: {forecast}")
for value in forecast.forecast_values:
print(f" target_time: {value.target_time}, "
f"expected_power_generation: {value.expected_power_generation_megawatts}")
print(
f" target_time: {value.target_time}, "
f"expected_power_generation: {value.expected_power_generation_megawatts}"
)

# Step 3: Save forecasts to the database
save_forecasts_to_db(forecasts=forecasts, session=db_session)

# Step 4: Verify forecasts were saved correctly
saved_forecast = db_session.query(ForecastSQL).first()
assert saved_forecast is not None, "No forecast was saved to the database!"
assert saved_forecast.model.name == test_config["model_name"], "Model name mismatch!"
assert (
saved_forecast.model.name == test_config["model_name"]
), "Model name mismatch!"
assert len(saved_forecast.forecast_values) > 0, "No forecast values were saved!"
print("\nSaved ForecastSQL Object Details:")
print(f"Model: {saved_forecast.model.name}")
Expand Down

0 comments on commit 0424255

Please sign in to comment.