FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-104235: Fix doctest loading issues in `test_enum` by chgnrdv · Pull Request #104236 · python/cpython · GitHub

Repository navigation

gh-104235: Fix doctest loading issues in test_enum - #104236

Closed
chgnrdv wants to merge 3 commits into
python:mainfrom
chgnrdv:fix-error-in-test_enum
Closed

chgnrdv wants to merge 3 commits into
python:mainfrom
chgnrdv:fix-error-in-test_enum

Conversation

chgnrdv commented May 6, 2023 •
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Contributor

Fixes problems with test_enum mentioned in #104235.

  • remove invalid doc file existence check
  • mark path to doc as module-relative by using module_relative flag

* remove invalid doc file existence check
* mark path to doc as module-relative by `module_relative` flag
Comment thread Lib/test/test_enum.py Outdated
'../../Doc/library/enum.rst',
optionflags=doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE,
))
tests.addTests(doctest.DocFileSuite(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

the whole test library is shipped to the user, while the docs may not.

Keep the behavior as is please.

chgnrdv May 6, 2023 •
edited
Loading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I agree that docs may not be present, but I see that path that is passed to os.path.exists should be changed to "../../Doc/library/enum.rst" in this case. Not sure about module_relative flag though.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Yeah, we need to figure out the correct path.

chgnrdv requested a review from sunmy2019 May 6, 2023 16:59

Copy link
Copy Markdown
Member

@ethanfurman

I think this one is a clean change. But we need to fix the new included test first. #104237

I think we may land this once #104237 is merged.

Copy link
Copy Markdown
Member

Fixed in #111180.

Thank you everyone for your efforts.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL