-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-104235: Fix doctest loading issues in test_enum
#104236
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
Conversation
* remove invalid doc file existence check * mark path to doc as module-relative by `module_relative` flag
Lib/test/test_enum.py
Outdated
'../../Doc/library/enum.rst', | ||
optionflags=doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE, | ||
)) | ||
tests.addTests(doctest.DocFileSuite( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the whole test library is shipped to the user, while the docs may not.
Keep the behavior as is please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we need to figure out the correct path.
Fixed in #111180. Thank you everyone for your efforts. |
Fixes problems with
test_enum
mentioned in #104235.module_relative
flagenum.Enum.__dir__
docs do not mention enum members in return value #104235