bpo-24758: Improve the error msg for unittest.mock.Mock()'s unsafe mode#12991
Conversation
kushaldas
left a comment
There was a problem hiding this comment.
"Attributes cannot start with 'assert' or 'assret'" is a better error message in this. Also, please check for the right error message in test_mock_unsafe as we are checking the assertion there.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
|
Thank you, @kushaldas. I have made the requested changes; please review again. |
|
Thanks for making the requested changes! @kushaldas: please review the changes made to this pull request. |
tirkarthi
left a comment
There was a problem hiding this comment.
LGTM. The attribute can start with assert or assret in unsafe mode but adding it to error message looks intrusive to me and this seems like a good improvement.
Thank you for the PR.
kushaldas
left a comment
There was a problem hiding this comment.
This looks good now, thank you for the PR. Approved.
|
@kushaldas: Please replace |
https://bugs.python.org/issue24758