Skip to content

Commit 889515d

Browse files
committed
updating tests for make_xml
1 parent e117daf commit 889515d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

freud_api_crawler/freud_api_crawler.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,6 +1212,7 @@ def make_xml(workpath, out_dir, save=False):
12121212
:return: A lxml.etree
12131213
"""
12141214
data = glob.glob(os.path.join(out_dir, workpath, "data", "*.json"))
1215+
doc = []
12151216
for x in data:
12161217
try:
12171218
with open(x, 'r', encoding='utf8') as f:
@@ -1244,4 +1245,5 @@ def make_xml(workpath, out_dir, save=False):
12441245
savepath = os.path.join(out_dir, workpath)
12451246
with open(os.path.join(savepath, f"sfe-{filename}.xml"), 'wb') as f:
12461247
f.write(ET.tostring(tei, pretty_print=True, encoding="utf-8"))
1247-
return tei
1248+
doc.append(tei)
1249+
return doc[0]

0 commit comments

Comments
 (0)