[Python-Dev] [Python-checkins] cpython (2.7): Fix test_fcntl to run properly on systems that do not support the flags (original) (raw)
Gregory P. Smith greg at krypto.org
Tue Nov 26 08:07:44 CET 2013
- Previous message: [Python-Dev] [Python-checkins] cpython (2.7): Fix test_fcntl to run properly on systems that do not support the flags
- Next message: [Python-Dev] [Python-checkins] cpython: Close #19762: Fix name of _get_traces() and _get_object_traceback() function
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Nov 25, 2013 at 12:46 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
On 25 Nov 2013 14:46, "gregory.p.smith" <python-checkins at python.org> wrote: > > http://hg.python.org/cpython/rev/cac7319c5972 > changeset: 87537:cac7319c5972 > branch: 2.7 > parent: 87534:3981e57a7bdc > user: Gregory P. Smith <greg at krypto.org> > date: Mon Nov 25 04:45:27 2013 +0000 > summary: > Fix testfcntl to run properly on systems that do not support the flags > used in the "does the value get passed in properly" test. > > files: > Lib/test/testfcntl.py | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > > diff --git a/Lib/test/testfcntl.py b/Lib/test/testfcntl.py > --- a/Lib/test/testfcntl.py > +++ b/Lib/test/testfcntl.py > @@ -113,7 +113,10 @@ > self.skipTest("FNOTIFY or DNMULTISHOT unavailable") > fd = os.open(os.path.dirname(os.path.abspath(TESTFN)), os.ORDONLY) > try: > + # This will raise OverflowError if issue1309352 is present. > fcntl.fcntl(fd, cmd, flags) > + except IOError: > + pass # Running on a system that doesn't support these flags. > finally: > os.close(fd) Raising a skip is generally preferred to marking a test that can't be executed as passing. For this test this is still a pass because no OverflowError was raised. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20131125/c9fa57aa/attachment.html>
- Previous message: [Python-Dev] [Python-checkins] cpython (2.7): Fix test_fcntl to run properly on systems that do not support the flags
- Next message: [Python-Dev] [Python-checkins] cpython: Close #19762: Fix name of _get_traces() and _get_object_traceback() function
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]