From 6ac6de19ccd7e42d0da1a7b05031528fd1491e57 Mon Sep 17 00:00:00 2001 From: "Issam E. Maghni" Date: Mon, 24 Mar 2025 08:26:54 -0400 Subject: [PATCH] Fix junit-xml warnings --- README.md | 2 +- tests/test_junit.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 434cf29..e8504aa 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ To convert the tests to JUnit XML: import junit_xml with open("test_results.xml", "w") as out_file: - junit_xml.TestSuite.to_file(out_file, [results.to_junit()]) + junit_xml.to_xml_report_file(out_file, [results.to_junit()]) ``` ### Test Results Format diff --git a/tests/test_junit.py b/tests/test_junit.py index 2a6d706..0245089 100644 --- a/tests/test_junit.py +++ b/tests/test_junit.py @@ -23,7 +23,7 @@ def test_junit_from_unity_normal(self): results = unity_test_parser.TestResults(output_file.read(), unity_test_parser.UNITY_BASIC) out_string = io.StringIO() - junit_xml.TestSuite.to_file(out_string, [results.to_junit()]) + junit_xml.to_xml_report_file(out_string, [results.to_junit()]) verify(out_string.getvalue(), self.reporter) def test_junit_from_unity_fixture(self): @@ -32,5 +32,5 @@ def test_junit_from_unity_fixture(self): results = unity_test_parser.TestResults(output_file.read(), unity_test_parser.UNITY_FIXTURE_VERBOSE) out_string = io.StringIO() - junit_xml.TestSuite.to_file(out_string, [results.to_junit()]) + junit_xml.to_xml_report_file(out_string, [results.to_junit()]) verify(out_string.getvalue(), self.reporter)