MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / test_import_xml

Function test_import_xml

tests/test_unread_desc.py:71–86  ·  view source on GitHub ↗
(print_db_info)

Source from the content-addressed store, hash-verified

69
70# noinspection PyUnusedLocal
71def test_import_xml(print_db_info):
72 usr = PortUser()
73# for path in XML_FILES:
74 xml_file = "jeffy_ja-en[99].xml"
75 fit_count = int(re.search(r"\[(\d+)\]", xml_file).group(1))
76 fits = None
77 with open(os.path.join(script_dir, xml_file), "r") as file_:
78 srcString = file_.read()
79 srcString = str(srcString, "utf-8")
80 # (basestring, IPortUser, basestring) -> list[eos.saveddata.fit.Fit]
81 usr.on_port_process_start()
82 #stpw.reset()
83 #with stpw:
84 fits = Port.importXml(srcString, usr)
85
86 assert fits is not None and len(fits) is fit_count

Callers

nothing calls this directly

Calls 2

PortUserClass · 0.85
importXmlMethod · 0.80

Tested by

no test coverage detected