Skip to content

Fix test_markdown_doctest#383

Merged
jesper-friis merged 20 commits intomasterfrom
fix-doctests
May 7, 2025
Merged

Fix test_markdown_doctest#383
jesper-friis merged 20 commits intomasterfrom
fix-doctests

Conversation

@jesper-friis
Copy link
Contributor

@jesper-friis jesper-friis commented Apr 25, 2025

Description

Fixed the test_markdown_doctest() test such that it fails properly when doctest finds an error in the markdown documentation.

Also fixed failing examples in the documentation revealed by the above fix.

The reduced test coverage is due to correcting some previously failing doctests. Since we don't know whether the user has a ~/.config/tripper/session.yaml or not, we cannot test calling Session() without argument since we don't know whether it will fail or not.

Type of change

  • Bug fix and code cleanup
  • New feature
  • Documentation update
  • Testing

Checklist for the reviewer

This checklist should be used as a help for the reviewer.

  • Is the change limited to one issue?
  • Does this PR close the issue?
  • Is the code easy to read and understand?
  • Do all new feature have an accompanying new test?
  • Has the documentation been updated as necessary?
  • Is the code properly tested?

@codecov
Copy link

codecov bot commented Apr 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.69%. Comparing base (c54f12b) to head (20f6b12).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #383      +/-   ##
==========================================
- Coverage   82.17%   81.69%   -0.48%     
==========================================
  Files          28       28              
  Lines        3775     3775              
==========================================
- Hits         3102     3084      -18     
- Misses        673      691      +18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines 1051 to 1053
3. If two units have the same sum, the unit that minimises
`log10(magnitude/5)` is selected, where magnitude of this
quantity when expressed in SI base units.
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a complete sentence, and I do not understasnd it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it the example in point 2 that you don't understand.

Copy link
Contributor

Choose a reason for hiding this comment

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

It is point 3. There is something wrong in the sentence. What does "where magnitude of this
quantity when expressed in SI base units" mean?

Copy link
Contributor

@francescalb francescalb left a comment

Choose a reason for hiding this comment

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

Please check comments

jesper-friis and others added 2 commits May 2, 2025 22:51
Co-authored-by: Francesca L. Bleken <48128015+francescalb@users.noreply.github.com>
Co-authored-by: Francesca L. Bleken <48128015+francescalb@users.noreply.github.com>
@jesper-friis jesper-friis requested a review from francescalb May 2, 2025 21:05
@jesper-friis jesper-friis enabled auto-merge (squash) May 7, 2025 12:22
@jesper-friis jesper-friis merged commit e2f9cd0 into master May 7, 2025
34 of 37 checks passed
@jesper-friis jesper-friis deleted the fix-doctests branch May 7, 2025 13:15
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