Verified Commit c948c081 authored by Leon Mauritz Möller's avatar Leon Mauritz Möller
Browse files

adapter.xml: rename read_xml_aas_file to read_aas_xml_file

Re-publish read_aas_xml_file in adapter.xml.__init__.
parent 3ad295cf
Pipeline #266785 passed with stage
in 3 minutes and 1 second
......@@ -9,3 +9,4 @@
from .xml_serialization import write_aas_xml_file
from .xml_deserialization import read_aas_xml_file
......@@ -985,7 +985,7 @@ def _construct_concept_description(element: etree.Element, failsafe: bool, **_kw
return cd
def read_xml_aas_file(file: IO, failsafe: bool = True) -> model.DictObjectStore:
def read_aas_xml_file(file: IO, failsafe: bool = True) -> model.DictObjectStore:
Read an Asset Administration Shell XML file according to 'Details of the Asset Administration Shell', chapter 5.4
......@@ -13,7 +13,7 @@ import io
import unittest
from aas import model
from aas.adapter.xml import xml_serialization, xml_deserialization
from aas.adapter.xml import write_aas_xml_file, read_aas_xml_file
from import example_aas_missing_attributes, example_submodel_template, \
example_aas_mandatory_attributes, example_aas, example_concept_description
......@@ -22,12 +22,12 @@ from import AASDataChecker
def _serialize_and_deserialize(data: model.DictObjectStore) -> model.DictObjectStore:
file = io.BytesIO()
xml_serialization.write_aas_xml_file(file=file, data=data)
write_aas_xml_file(file=file, data=data)
# try deserializing the xml document into a DictObjectStore of AAS objects with help of the xml_deserialization
# module
return xml_deserialization.read_xml_aas_file(file, failsafe=False)
return read_aas_xml_file(file, failsafe=False)
class XMLSerializationDeserializationTest(unittest.TestCase):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment