Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #3533: properly escape raw XML object #4167

Merged
merged 2 commits into from
Oct 16, 2018

Conversation

vbarbaresi
Copy link
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.
Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Thanks @vbarbaresi!

@codecov
Copy link

codecov bot commented Oct 16, 2018

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
Copy link

coveralls commented Oct 17, 2018

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