Description of the issue
(At least) the tests which rely on XML file fail. This is probably caused by the partial XML file download which only contains some technologies. However, test_read_xml_file() tries to read "EinheitenKernkraft" (develop) or "EinheitenStromVerbraucher" (622-deprecate-api-download)
Steps to Reproduce
- Delete the DB and XML files
- Run
pytest -> 29 passed, 5 skipped
- Run
pytest again -> test_read_xml_file() fails:
Message from 622-deprecate-api-download:
zipped_xml_file_path = '/SOME/PATH/.open-MaStR/data/xml_download/Gesamtdatenexport_20251208.zip'
@pytest.mark.skipif(
not _xml_file_exists, reason="The zipped xml file could not be found."
)
def test_read_xml_file(zipped_xml_file_path):
file_name = "EinheitenStromVerbraucher"
with ZipFile(zipped_xml_file_path, "r") as f:
> df = read_xml_file(f, f"{file_name}.xml")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Ideas of solution
I propose to
- replace this skipping by a clear dependency like here
- change the xml name to a file which is downloaded in the dependency, e.g. "EinheitenWind.xml" OR add the files to the download.
Description of the issue
(At least) the tests which rely on XML file fail. This is probably caused by the partial XML file download which only contains some technologies. However,
test_read_xml_file()tries to read "EinheitenKernkraft" (develop) or "EinheitenStromVerbraucher" (622-deprecate-api-download)Steps to Reproduce
pytest-> 29 passed, 5 skippedpytestagain ->test_read_xml_file()fails:Message from
622-deprecate-api-download:Ideas of solution
I propose to