Skip to content

Improve doctest output #351

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mcbarton
Copy link
Collaborator

@mcbarton mcbarton commented Jun 16, 2025

Description

Please include a summary of changes, motivation and context for this PR.

Currently the output from doctest isn't very useful, as it only gives a number of how many tests pass and fail at the end, and not a list of which tests fail (see image below). It is also hard to disentangle which output to the terminal is from which tests.
image

This PR fixes this by providing a custom doctest config, where we pass specific command line arguments to doctest via the method outlined in doctests documentation (see https://github.com/doctest/doctest/blob/master/doc/markdown/main.md )

In the case of the browser tests that xeus-cpp has, this is the only way to pass these command line arguments.

Fixes # (issue)

Type of change

Please tick all options which are relevant.

  • Bug fix
  • New feature
  • Added/removed dependencies
  • Required documentation updates

@mcbarton
Copy link
Collaborator Author

This is what the improved output from doctest looks like after this PR (see https://github.com/compiler-research/xeus-cpp/actions/runs/15680986691/job/44172145178?pr=351#step:6:7636 for where I took the screenshot)
image

@codecov-commenter
Copy link

codecov-commenter commented Jun 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.78%. Comparing base (951e670) to head (3c96cc6).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #351   +/-   ##
=======================================
  Coverage   81.78%   81.78%           
=======================================
  Files          20       20           
  Lines         950      950           
  Branches       87       87           
=======================================
  Hits          777      777           
  Misses        173      173           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@mcbarton mcbarton force-pushed the Improve-doctest-output branch from d5bb757 to 3c96cc6 Compare June 17, 2025 10:26
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

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.

2 participants