MCPcopy Create free account
hub / github.com/FreeOpcUa/python-opcua / test_structs_save_and_import

Method test_structs_save_and_import

tests/tests_unit.py:52–59  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

50 self.assertTrue(v2.is_array)
51
52 def test_structs_save_and_import(self):
53 xmlpath = "tests/example.bsd"
54 c = StructGenerator()
55 c.make_model_from_file(xmlpath)
56 struct_dict = c.save_and_import("structures.py")
57 for k, v in struct_dict.items():
58 a = v()
59 self.assertEqual(k, a.__class__.__name__)
60
61 def test_custom_structs(self):
62 xmlpath = "tests/example.bsd"

Callers

nothing calls this directly

Calls 3

make_model_from_fileMethod · 0.95
save_and_importMethod · 0.95
StructGeneratorClass · 0.90

Tested by

no test coverage detected