| 69 | |
| 70 | # noinspection PyUnusedLocal |
| 71 | def 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 |