gh-133210: Fix test_pydoc in --without-doc-strings mode#133271
gh-133210: Fix test_pydoc in --without-doc-strings mode#133271sobolevn merged 1 commit intopython:mainfrom
test_pydoc in --without-doc-strings mode#133271Conversation
| self.assertIn(' | __repr__(self, /) from builtins.object', lines) | ||
| self.assertIn(' | object_repr = __repr__(self, /)', lines) | ||
| else: | ||
| self.assertIn(' | count(self, object, /) from builtins.list', lines) |
There was a problem hiding this comment.
We don't have CI building Python without docstrings, this code path is less well tested. Maybe just remove it and only keep tests when we have C docstrings?
There was a problem hiding this comment.
In this case we can have unexpected results when python is built without docstrings and no one will ever notice. Plus, this gives an example that you need to think about both modes when writting tests.
I don't think that signature of repr, list.count and list.get without docstrings will change that often.
But, I don't have a strong opinion here for sure, I will make any change that you think is best here
vstinner
left a comment
There was a problem hiding this comment.
LGTM.
Ok, let's keep these tests without docstrings.
|
Thanks @sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…thonGH-133271) (cherry picked from commit 4912b29) Co-authored-by: sobolevn <mail@sobolevn.me>
|
GH-133288 is a backport of this pull request to the 3.13 branch. |
|
Thank you! Working on other modules 👍 |
Tests now pass with
--without-doc-stringsand in a regular mode.--without-doc-strings#133210