Skip to content

Commit

Permalink
removed commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
veenstrajelmer committed Sep 3, 2024
1 parent d8bc79b commit b2d07e8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
3 changes: 0 additions & 3 deletions hatyan/analysis_prediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,6 @@ def prediction_singleperiod(comp:pd.DataFrame, times:pd.DatetimeIndex, hatyan_se
else:
raise ValueError("provided times are timezone-aware and components are timezone-naive, "
"this cannot be processed.")
# raise ValueError("provided times and components should both be timezone-aware "
# "or timezone-naive, not mixed.")
# TODO: this is not mixed anymore, but only raised if tzone_pred is not None and tzone_comp is None:

# remove timezone from prediction times: first convert times to tzone of components, then make timezone naive
if tzone_convert:
Expand Down
7 changes: 0 additions & 7 deletions tests/test_analysis_prediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,13 +577,6 @@ def test_prediction_raise_mixed_tznaive_tzaware():
with pytest.raises(ValueError) as e:
hatyan.prediction(comp, times=dtindex)
assert "provided times are timezone-aware and components are timezone-naive, this cannot be processed." in str(e.value)
# assert "provided times and components should both be timezone-aware or timezone-naive, not mixed" in str(e.value)

# comp.attrs["tzone"] = "UTC"
# dtindex = pd.date_range("2020-01-01","2020-01-02", freq="10min")
# with pytest.raises(ValueError) as e:
# hatyan.prediction(comp, times=dtindex)
# assert "provided times and components should both be timezone-aware or timezone-naive, not mixed" in str(e.value)


@pytest.mark.unittest
Expand Down

0 comments on commit b2d07e8

Please sign in to comment.