mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-09-13 07:21:16 +00:00
Assert text files are in utf8 (#350)
Read and write text files with utf8 encoding. Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
This commit is contained in:
@@ -61,7 +61,7 @@ def sample_settings(config_eos):
|
||||
@pytest.fixture
|
||||
def sample_forecast_data():
|
||||
"""Fixture that returns sample forecast data converted to pydantic model."""
|
||||
with open(FILE_TESTDATA_PV_FORECAST_INPUT_1, "r") as f_in:
|
||||
with open(FILE_TESTDATA_PV_FORECAST_INPUT_1, "r", encoding="utf8") as f_in:
|
||||
input_data = f_in.read()
|
||||
return PVForecastAkkudoktor._validate_data(input_data)
|
||||
|
||||
@@ -69,7 +69,7 @@ def sample_forecast_data():
|
||||
@pytest.fixture
|
||||
def sample_forecast_data_raw():
|
||||
"""Fixture that returns raw sample forecast data."""
|
||||
with open(FILE_TESTDATA_PV_FORECAST_INPUT_1, "r") as f_in:
|
||||
with open(FILE_TESTDATA_PV_FORECAST_INPUT_1, "r", encoding="utf8") as f_in:
|
||||
input_data = f_in.read()
|
||||
return input_data
|
||||
|
||||
@@ -77,7 +77,7 @@ def sample_forecast_data_raw():
|
||||
@pytest.fixture
|
||||
def sample_forecast_report():
|
||||
"""Fixture that returns sample forecast data report."""
|
||||
with open(FILE_TESTDATA_PV_FORECAST_RESULT_1, "r") as f_res:
|
||||
with open(FILE_TESTDATA_PV_FORECAST_RESULT_1, "r", encoding="utf8") as f_res:
|
||||
input_data = f_res.read()
|
||||
return input_data
|
||||
|
||||
|
Reference in New Issue
Block a user