Skip to content

Commit

Permalink
test.adapter.xml.xml_deserialization: remove unneeded 'type: ignore' …
Browse files Browse the repository at this point in the history
…comments
  • Loading branch information
jkhsjdhjs committed Nov 3, 2023
1 parent 1674911 commit 24b759b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/adapter/xml/test_xml_deserialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def _assertInExceptionAndLog(self, xml: str, strings: Union[Iterable[str], str],
read_aas_xml_file(bytes_io, failsafe=False)
cause = _root_cause(err_ctx.exception)
for s in strings:
self.assertIn(s, log_ctx.output[0]) # type: ignore
self.assertIn(s, log_ctx.output[0])
self.assertIn(s, str(cause))

def test_malformed_xml(self) -> None:
Expand Down Expand Up @@ -177,7 +177,7 @@ def test_reference_kind_mismatch(self) -> None:
with self.assertLogs(logging.getLogger(), level=logging.WARNING) as context:
read_aas_xml_file(io.BytesIO(xml.encode("utf-8")), failsafe=False)
for s in ("GLOBAL_REFERENCE", "IRI=http://acplt.org/test_ref", "Asset"):
self.assertIn(s, context.output[0]) # type: ignore
self.assertIn(s, context.output[0])

def test_invalid_submodel_element(self) -> None:
# TODO: simplify this should our suggestion regarding the XML schema get accepted
Expand Down Expand Up @@ -265,7 +265,7 @@ def test_operation_variable_too_many_submodel_elements(self) -> None:
""")
with self.assertLogs(logging.getLogger(), level=logging.WARNING) as context:
read_aas_xml_file(io.BytesIO(xml.encode("utf-8")), failsafe=False)
self.assertIn("aas:value", context.output[0]) # type: ignore
self.assertIn("aas:value", context.output[0])

def test_duplicate_identifier(self) -> None:
xml = _xml_wrap("""
Expand Down Expand Up @@ -319,7 +319,7 @@ def get_clean_store() -> model.DictObjectStore:
with self.assertLogs(logging.getLogger(), level=logging.INFO) as log_ctx:
identifiers = read_aas_xml_file_into(object_store, bytes_io, replace_existing=False, ignore_existing=True)
self.assertEqual(len(identifiers), 0)
self.assertIn("already exists in the object store", log_ctx.output[0]) # type: ignore
self.assertIn("already exists in the object store", log_ctx.output[0])
submodel = object_store.pop()
self.assertIsInstance(submodel, model.Submodel)
self.assertEqual(submodel.id_short, "test123")
Expand Down

0 comments on commit 24b759b

Please sign in to comment.