2013/9/8 Antoine Pitrou <solip...@pitrou.net>: > On Sun, 8 Sep 2013 11:54:00 +0200 (CEST) > victor.stinner <python-check...@python.org> wrote: >> http://hg.python.org/cpython/rev/b7f6f6f59e91 >> changeset: 85619:b7f6f6f59e91 >> user: Victor Stinner <victor.stin...@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 _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com