Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-108794: doctest counts skipped tests#108795

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 5 commits intopython:mainfromvstinner:doctest_skipped
Sep 2, 2023

Conversation

vstinner
Copy link
Member

@vstinnervstinner commentedSep 2, 2023
edited by github-actionsbot
Loading

  • Add 'skipped' attribute to doctest.TestResults.
  • Rename private DocTestRunner._name2ft attribute to DocTestRunner._stats.
  • Use f-string for string formatting.
  • Add some tests.

📚 Documentation preview 📚:https://cpython-previews--108795.org.readthedocs.build/

* Add 'skipped' attribute to doctest.TestResults.* Rename private DocTestRunner._name2ft attribute  to DocTestRunner._stats.* Use f-string for string formatting.* Add some tests.
@vstinner
Copy link
MemberAuthor

When a doctest.TestResults is unpacked withx, y = result, there is no backward incompatible changes. TestResults still only unpacks the first 2 members (failed and attempted).

Example:failed, attempted = result.

@vstinner
Copy link
MemberAuthor

I wrote this enhancement while working on#108793 which logs the number of executed tests.

Copy link
Member

@AlexWaygoodAlexWaygood left a comment

Choose a reason for hiding this comment

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

Nice feature! A few docs nits:

Document also DocTestRunner API for statistics, document itsattributes.
@vstinner
Copy link
MemberAuthor

@AlexWaygood: Would you mind to review the updated PR?

I updated my PR to address your remarks. I also renamedDocTestRunner.skipped toDocTestRunner.skips for consistency with existing attributes. Sadly,DocTestRunner andTestResults have different attribute names.

AlexWaygood reacted with thumbs up emoji

@vstinner
Copy link
MemberAuthor

cc@tim-one

Copy link
Member

@AlexWaygoodAlexWaygood left a comment

Choose a reason for hiding this comment

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

A few more minor suggestions:

@vstinner
Copy link
MemberAuthor

@AlexWaygood: Oh thanks, I addressed your second review. I also mentioned the addition of theskips attribute in What's New/Changelog entry.

AlexWaygood reacted with thumbs up emoji

Copy link
Member

@AlexWaygoodAlexWaygood left a comment

Choose a reason for hiding this comment

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

Thanks!

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@vstinnervstinner merged commit4f9b706 intopython:mainSep 2, 2023
@vstinnervstinner deleted the doctest_skipped branchSeptember 2, 2023 14:42
@vstinner
Copy link
MemberAuthor

Thanks for the great review@AlexWaygood! I merged my PR.

AlexWaygood reacted with heart emoji

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

@AlexWaygoodAlexWaygoodAlexWaygood approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@vstinner@AlexWaygood@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp