test: consolidate suites and remove redundant cases (#1459)

Regression tests were scattered across feature- and bug-specific files, and some suites repeated the same checks. Group tests by responsibility, isolate feature fixtures in test classes, and remove duplicate or obsolete cases.

The review covered all 127 collected test modules on main. This reduces them and removes or combines definitions:.

 No application code changes.
This commit is contained in:
Normann
2026-10-28 20:15:25 +01:00
committed by GitHub
parent 2863373b17
commit 5d7198d090
31 changed files with 1719 additions and 2159 deletions
+1 -27
View File
@@ -1,12 +1,9 @@
"""Tests for PVForecastPVLib prediction provider."""
import bz2
import pickle
from pathlib import Path
from unittest.mock import MagicMock, Mock, patch
from unittest.mock import MagicMock, patch
import numpy as np
import pandas as pd
import pytest
@@ -1054,7 +1051,6 @@ class TestProvider:
weather = pd.DataFrame()
with patch.object(
Prediction,
"keys_to_dataframe",
@@ -1285,28 +1281,6 @@ class TestProvider:
class TestCalculation:
"""Tests for PVLib power calculation."""
@pytest.mark.skip("PVLib bails out on empty weather data")
def test_calculate_empty_weather(self, provider, sample_settings_4planes):
"""Empty weather dataframe returns empty result."""
weather = pd.DataFrame(
columns=[
"ghi",
"dni",
"dhi",
"temp_air",
"wind_speed",
"relative_humidity",
"precipitable_water",
"cloud_cover",
],
index=pd.DatetimeIndex([], tz="Europe/Berlin"),
)
result = provider._calculate_pvlib_power(weather)
assert isinstance(result, pd.DataFrame)
assert result.empty
@patch("pvlib.modelchain.ModelChain")
@patch("pvlib.location.Location")