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

log contexts for failures in JUnit reporter #441

Closed
runave opened this issue Nov 27, 2020 · 1 comment
Closed

log contexts for failures in JUnit reporter #441

runave opened this issue Nov 27, 2020 · 1 comment

Comments

@runave
Copy link
Contributor

runave commented Nov 27, 2020

Description

We are using doctest with JUnit reports in our pipeline and if something goes wrong, then sometimes it's helpful to see the contexts of the failure as well.
I have extended JUnitReporter with log_contexts in my fork, based on the similar functionality of ConsoleReporter - please feel free to accept the pull request.
example failure with contexts:

      <failure message="1 != 1" type="CHECK">
logging.cpp(0):
CHECK( vec[i] != (1 &lt;&lt; i) ) is NOT correct!
  values: CHECK( 1 != 1 )
  logged: current iteration of loop:
          i := 0

      </failure>
@onqtam
Copy link
Member

onqtam commented Dec 3, 2020

Merged the PR - thanks for the contribution! Closing this issue and will release a new version of doctest hopefully in 1-2 weeks.

@onqtam onqtam closed this as completed Dec 3, 2020
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

No branches or pull requests

2 participants