From 4bd08a272f059998cedf9b7779f944d49eba13a6 Mon Sep 17 00:00:00 2001 From: Brian Beyer Date: Sat, 22 Feb 2020 13:43:21 -0700 Subject: [PATCH 1/2] update readme --- README.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.rst b/README.rst index 470cef1..b585af1 100644 --- a/README.rst +++ b/README.rst @@ -89,3 +89,10 @@ Running the tests pip install tox tox +Releasing a new version +----------------------- + +1. Bump version in `setup.py` +2. Build distribution with `python setup.py sdist bdist_wheel` +3. Upload to Pypi with `twine upload dist/*` +4. Verify the new version was uploaded at https://pypi.org/project/junit-xml/#history From 35a3cae12073be96f53ba0357301a13324b480b1 Mon Sep 17 00:00:00 2001 From: Madhav KUMAR Date: Fri, 25 Jun 2021 12:45:58 +0530 Subject: [PATCH 2/2] writing str issue when NON-ASCII present fixed --- junit_xml/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/junit_xml/__init__.py b/junit_xml/__init__.py index 0cfef29..0dd4426 100644 --- a/junit_xml/__init__.py +++ b/junit_xml/__init__.py @@ -318,8 +318,9 @@ def to_xml_report_file(file_descriptor, test_suites, prettyprint=True, encoding= Writes the JUnit XML document to a file. """ xml_string = to_xml_report_string(test_suites, prettyprint=prettyprint, encoding=encoding) - # has problems with encoded str with non-ASCII (non-default-encoding) characters! - file_descriptor.write(xml_string) + # this fixes the problem with encoded str with non-ASCII (non-default-encoding) characters! + string_for_output = xml_string.encode('utf8', 'replace') + file_descriptor.write(string_for_output) def _clean_illegal_xml_chars(string_to_clean):