(original) (raw)
On 25 Nov 2013 14:46, "gregory.p.smith" <python-checkins@python.org> wrote:
\>
\> http://hg.python.org/cpython/rev/cac7319c5972
\> changeset: � 87537:cac7319c5972
\> branch: � � �2.7
\> parent: � � �87534:3981e57a7bdc
\> user: � � � �Gregory P. Smith <greg@krypto.org>
\> date: � � � �Mon Nov 25 04:45:27 2013 +0000
\> summary:
\> � Fix test\_fcntl 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/test\_fcntl.py | �3 +++
\> � 1 files changed, 3 insertions(+), 0 deletions(-)
\>
\>
\> diff --git a/Lib/test/test\_fcntl.py b/Lib/test/test\_fcntl.py
\> --- a/Lib/test/test\_fcntl.py
\> +++ b/Lib/test/test\_fcntl.py
\> @@ -113,7 +113,10 @@
\> � � � � � � �self.skipTest("F\_NOTIFY or DN\_MULTISHOT unavailable")
\> � � � � �fd = os.open(os.path.dirname(os.path.abspath(TESTFN)), os.O\_RDONLY)
\> � � � � �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.
Cheers,
Nick.
>
\>
\> --
\> Repository URL: http://hg.python.org/cpython
\>
\> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
\> Python-checkins mailing list
\> Python-checkins@python.org
\> https://mail.python.org/mailman/listinfo/python-checkins
\>