[issue28078] Silence resource warnings in test_socket

2016-09-11 Thread Xiang Zhang

Changes by Xiang Zhang :


--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28078] Silence resource warnings in test_socket

2016-09-11 Thread Christian Heimes

Christian Heimes added the comment:

Oh heck! I'm not sure what happened here. The test was passing locally. I can 
only assume that I accidentally modified the file between test run and commit.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28078] Silence resource warnings in test_socket

2016-09-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8b655668c04f by Christian Heimes in branch 'default':
Issue #28078: Add missing colon
https://hg.python.org/cpython/rev/8b655668c04f

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28078] Silence resource warnings in test_socket

2016-09-11 Thread Xiang Zhang

Xiang Zhang added the comment:

Christian, you forget a : after else.

--
status: pending -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28078] Silence resource warnings in test_socket

2016-09-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c515bc3b29bf by Christian Heimes in branch 'default':
Issue #28078: Silence resource warnings in test_socket. Initial patch by Xiang 
Zhang, thanks
https://hg.python.org/cpython/rev/c515bc3b29bf

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28078] Silence resource warnings in test_socket

2016-09-11 Thread Christian Heimes

Christian Heimes added the comment:

Thanks for the report and your patch. Let's watch the build bot.

--
stage: patch review -> commit review
status: open -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28078] Silence resource warnings in test_socket

2016-09-11 Thread Xiang Zhang

Xiang Zhang added the comment:

It's your code. Do what you like. :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28078] Silence resource warnings in test_socket

2016-09-11 Thread Christian Heimes

Christian Heimes added the comment:

Thanks! The first fix looks good. For the second one I'd rather wrap the test 
body in a with statement:

def test_sendmsg_afalg_args(self):
sock = socket.socket(socket.AF_ALG, socket.SOCK_SEQPACKET, 0)
with sock:
with self.assertRaises(TypeError):
sock.sendmsg_afalg()
...

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28078] Silence resource warnings in test_socket

2016-09-11 Thread Xiang Zhang

Changes by Xiang Zhang :


--
keywords: +patch
Added file: http://bugs.python.org/file44556/test_socket.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28078] Silence resource warnings in test_socket

2016-09-11 Thread Xiang Zhang

New submission from Xiang Zhang:

test_aead_aes_gcm (test.test_socket.LinuxKernelCryptoAPI) ... 
/home/angwer/cpython/Lib/unittest/case.py:600: ResourceWarning: unclosed 

  testMethod()
skipped "('[Errno 2] No such file or directory', 'aead', 'gcm(aes)')"
test_sendmsg_afalg_args (test.test_socket.LinuxKernelCryptoAPI) ... 
/home/angwer/cpython/Lib/unittest/case.py:600: ResourceWarning: unclosed 

  testMethod()
ok

Christian, after issue27744, there are 2 resource warnings in test_socket. 
test_socket.patch eliminates them.

--
components: Tests
messages: 275803
nosy: christian.heimes, xiang.zhang
priority: normal
severity: normal
stage: patch review
status: open
title: Silence resource warnings in test_socket
type: behavior
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com