A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2013-September/128424.html below:

[Python-Dev] cpython: Issue #18904: test_socket: add inheritance tests using fcntl and FD_CLOEXEC

[Python-Dev] cpython: Issue #18904: test_socket: add inheritance tests using fcntl and FD_CLOEXEC [Python-Dev] cpython: Issue #18904: test_socket: add inheritance tests using fcntl and FD_CLOEXECVictor Stinner victor.stinner at gmail.com
Sun Sep 8 15:38:01 CEST 2013
2013/9/8 Antoine Pitrou <solipsis at pitrou.net>:
> On Sun,  8 Sep 2013 11:54:00 +0200 (CEST)
> victor.stinner <python-checkins at python.org> wrote:
>> http://hg.python.org/cpython/rev/b7f6f6f59e91
>> changeset:   85619:b7f6f6f59e91
>> user:        Victor Stinner <victor.stinner at gmail.com>
>> date:        Sun Sep 08 11:53:09 2013 +0200
>> summary:
>>   Issue #18904: test_socket: add inheritance tests using fcntl and FD_CLOEXEC
>>
> [...]
>>
>> +    if fcntl:
>> +        def test_get_inheritable_cloexec(self):
>
> The right way to do this would be to skip the test if fcntl doesn't
> exist.

Ok.

First, I added two methods to get and set the FD_CLOXEC flag. Later, I
inlined these methods because it makes the code more readable.

I modified the tests to use @unittest.skipIf decorator:

New changeset aea58e1cae75 by Victor Stinner in branch 'default':
Issue #18904: test_os and test_socket use unittest.skipIf() to check if fcntl
http://hg.python.org/cpython/rev/aea58e1cae75

Victor
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4