Skip to content

Commit 85d7a9e

Browse files
committed
fixing syntax errors
1 parent 04a4910 commit 85d7a9e

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

generate_xml.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -697,10 +697,16 @@ def start_unit_test_file(self):
697697
success += 1
698698
self.passed_count += 1
699699

700-
self.fh.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n")
701-
self.fh.write("<testsuites>\n")
702-
self.fh.write(" <testsuite errors=\"%d\" tests=\"%d\" failures=\"%d\" name=\"%s\" id=\"1\">\n" %
703-
(errors,success+failed+errors, failed, escape(self.env, quote=False)))
700+
data = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
701+
data += "<testsuites>\n"
702+
data += " <testsuite errors=\"{}\" tests=\"{}\" failures=\"{}\" name=\"{}\" id=\"1\">\n".format(
703+
errors,
704+
success+failed+errors,
705+
failed,
706+
escape(self.env, quote=False)
707+
)
708+
709+
self.fh.write(data.encode(self.encFmt, "replace"))
704710

705711
def get_xml_string(self, fpath = None):
706712

0 commit comments

Comments
 (0)