Skip to content

Fix #3533: properly escape raw XML object#4167

Merged
crazymerlyn merged 2 commits into
pytest-dev:masterfrom
vbarbaresi:3533_junit_escape_skipped
Oct 16, 2018
Merged

Fix #3533: properly escape raw XML object#4167
crazymerlyn merged 2 commits into
pytest-dev:masterfrom
vbarbaresi:3533_junit_escape_skipped

Conversation

@vbarbaresi

Copy link
Copy Markdown
Member

Using string formatting with the raw escaped object lead to string evaluation
resulting in "<py._xmlgen.raw object>" in skipped test Junit report

Format the unescaped string first, then use the XML escape method as a last step.

Using string formatting with the raw escaped object lead to string evaluation
"<py._xmlgen.raw object>"
Format the unescaped string first, then use the XML escape method as a last step.

@nicoddemus nicoddemus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @vbarbaresi!

@codecov

codecov Bot commented Oct 16, 2018

Copy link
Copy Markdown

Codecov Report

Merging #4167 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #4167      +/-   ##
=========================================
+ Coverage    95.8%   95.8%   +<.01%     
=========================================
  Files         109     109              
  Lines       23828   23836       +8     
  Branches     2352    2352              
=========================================
+ Hits        22829   22837       +8     
  Misses        708     708              
  Partials      291     291
Flag Coverage Δ
#docs 28.46% <0%> (-0.02%) ⬇️
#doctesting 28.46% <0%> (-0.02%) ⬇️
#linting 28.46% <0%> (-0.02%) ⬇️
#linux 95.66% <100%> (ø) ⬆️
#nobyte 91.92% <100%> (+0.01%) ⬆️
#numpy 93% <100%> (+0.01%) ⬆️
#pexpect 41.41% <0%> (-0.02%) ⬇️
#py27 94.01% <100%> (ø) ⬆️
#py34 92.36% <100%> (+0.03%) ⬆️
#py35 92.37% <100%> (+0.03%) ⬆️
#py36 94.06% <100%> (ø) ⬆️
#py37 92.41% <100%> (+0.03%) ⬆️
#trial 93% <100%> (+0.01%) ⬆️
#windows 94.04% <100%> (ø) ⬆️
#xdist 93.79% <100%> (ø) ⬆️
Impacted Files Coverage Δ
testing/test_junitxml.py 97.89% <100%> (+0.02%) ⬆️
src/_pytest/junitxml.py 93.33% <100%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 17655b5...d72154a. Read the comment docs.

@crazymerlyn crazymerlyn merged commit f858177 into pytest-dev:master Oct 16, 2018
@vbarbaresi vbarbaresi deleted the 3533_junit_escape_skipped branch October 16, 2018 15:42
@coveralls

coveralls commented Oct 17, 2018

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.02%) to 94.042% when pulling d72154a on vbarbaresi:3533_junit_escape_skipped into 17655b5 on pytest-dev:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants