Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(169803)

#25951: SSLSocket.sendall() does not return None on success like socket.sendall()

Can't Edit
Can't Publish+Mail
Start Review
Created:
3 years, 3 months ago by progval
Modified:
3 years, 3 months ago
Reviewers:
vadmium+py, palaviv
CC:
bill.janssen_gmail.com, AntoinePitrou, giampaolo.rodola, christian.heimes, alex, Valentin.Lorentz, devnull_psf.upfronthosting.co.za, Martin Panter, dstufft, palaviv
Visibility:
Public.

Patch Set 1 #

Total comments: 6

Patch Set 2 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Lib/ssl.py View 1 1 chunk +0 lines, -1 line 0 comments Download
Lib/test/test_ssl.py View 1 2 chunks +10 lines, -7 lines 0 comments Download

Messages

Total messages: 2
Martin Panter
https://bugs.python.org/review/25951/diff/16823/Lib/ssl.py File Lib/ssl.py (right): https://bugs.python.org/review/25951/diff/16823/Lib/ssl.py#newcode889 Lib/ssl.py:889: return None I think it would be simpler to ...
3 years, 3 months ago #1
palaviv
3 years, 3 months ago #2
http://bugs.python.org/review/25951/diff/16823/Lib/ssl.py
File Lib/ssl.py (right):

http://bugs.python.org/review/25951/diff/16823/Lib/ssl.py#newcode889
Lib/ssl.py:889: return None
On 2016/03/25 01:02:35, vadmium wrote:
> I think it would be simpler to just remove the return statement.

Done.

http://bugs.python.org/review/25951/diff/16823/Lib/test/test_ssl.py
File Lib/test/test_ssl.py (right):

http://bugs.python.org/review/25951/diff/16823/Lib/test/test_ssl.py#newcode2723
Lib/test/test_ssl.py:2723: ('send', s.send, True, [], lambda x: len(x)),
On 2016/03/25 01:02:35, vadmium wrote:
> lambda x: len(x) is equivalent to just len :)

Done.

http://bugs.python.org/review/25951/diff/16823/Lib/test/test_ssl.py#newcode2740
Lib/test/test_ssl.py:2740: if ret != ret_val_meth(indata):
On 2016/03/25 01:02:35, vadmium wrote:
> You should be able to use self.assertEqual(ret, ...). To differentiate the
> methods being tested, you can use the third paramenter: msg="sending with
> {}".format(meth_name). I guess the existing test is rather old.
> 
> In Python 3, you could use subTest() in the “for” loop instead. But I’m not
sure
> if this should also be applied to Python 2 as well, where that method is
> unavailable.

I tried to be as compatible as possible to the existing test. I changed to using
self.assertEqual
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+