bpo-42391: Clarify documentation of TestCase.assertIs#23348
bpo-42391: Clarify documentation of TestCase.assertIs#23348terryjreedy merged 1 commit intopython:masterfrom
Conversation
Doc/library/unittest.rst
Outdated
There was a problem hiding this comment.
I'm not sure that the word "exact" adds any value in the proposed new wording. Why not simply:
Test that first and second are (or are not) the same object.
?
2ca6ddd to
b6e431b
Compare
jstasiak
left a comment
There was a problem hiding this comment.
While I don't really see how the current wording points in the direction of first == second I like the new one better.
|
@jstasiak Can I please get a skip news label? |
terryjreedy
left a comment
There was a problem hiding this comment.
I can see a lawyerly justification for 'evaluate': first and second are not objects, but expressions that evaluate to objects. But the same applies to other assertX methods, in particular assertEqual, whose entry is "Test that first and second are equal." Ditto for `assertNotEqual. 'Evaluate' is also missing from all other entries in the 'common' group, so the change makes this entry consistent.
|
Thanks @cool-RR for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9. |
Removing 'evaluate' makes it more consistent with other assertX entries. (cherry picked from commit bd8c22e) Co-authored-by: Ram Rachum <ram@rachum.com>
|
GH-23456 is a backport of this pull request to the 3.9 branch. |
Removing 'evaluate' makes it more consistent with other assertX entries. (cherry picked from commit bd8c22e) Co-authored-by: Ram Rachum <ram@rachum.com>
|
GH-23457 is a backport of this pull request to the 3.8 branch. |
Removing 'evaluate' makes it more consistent with other assertX entries.
I believe the current phrasing with "evaluate to the same object" might be seen by some as
first == secondwhich is not the case.Can I please get labels for skipping news and maybe backporting?
https://bugs.python.org/issue42391