Skip to content

Commit 3e20bf8

Browse files
committed
tests: add check for double start tag
Issue #1019
1 parent 9c5fb67 commit 3e20bf8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

xlsxwriter/test/helperfunctions.py

+4
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ def _compare_xlsx_files(got_file, exp_file, ignore_files, ignore_elements):
153153
got_xml_str = got_xml_str.decode("utf-8")
154154
exp_xml_str = exp_xml_str.decode("utf-8")
155155

156+
# Check for errant xml tags in the generated file.
157+
if "<<" in got_xml_str:
158+
return "Double start tag in XlsxWriter file %s" % filename, ""
159+
156160
# Remove dates and user specific data from the core.xml data.
157161
if filename == "docProps/core.xml":
158162
exp_xml_str = re.sub(r" ?John", "", exp_xml_str)

0 commit comments

Comments
 (0)