[PATCH 1 of 8 py3-cleanup] run-tests: drop wifexited polyfill
Gregory Szorc
gregory.szorc at gmail.com
Mon May 18 16:44:28 UTC 2015
This series LGTM.
On Mon, May 18, 2015 at 8:58 AM, Augie Fackler <raf at durin42.com> wrote:
> # HG changeset patch
> # User Augie Fackler <augie at google.com>
> # Date 1431911704 14400
> # Sun May 17 21:15:04 2015 -0400
> # Node ID 57acc2e6aa0e382289b2e872df7416dbf229c714
> # Parent 0851b94ffcd70276eafaa3b19aadae60da9d72fa
> run-tests: drop wifexited polyfill
>
> os.WIFEXITED exists as of python 2.6 for me, so we no longer need this
> polyfill.
>
> diff --git a/tests/run-tests.py b/tests/run-tests.py
> --- a/tests/run-tests.py
> +++ b/tests/run-tests.py
> @@ -87,8 +87,6 @@ if sys.version_info > (3, 0, 0):
> if sys.version_info < (2, 5):
> subprocess._cleanup = lambda: None
>
> -wifexited = getattr(os, "WIFEXITED", lambda x: False)
> -
> def checkportisavailable(port):
> """return true if a port seems free to bind on localhost"""
> try:
> @@ -789,7 +787,7 @@ class Test(unittest.TestCase):
> raise
>
> ret = proc.wait()
> - if wifexited(ret):
> + if os.WIFEXITED(ret):
> ret = os.WEXITSTATUS(ret)
>
> if proc.timeout:
> @@ -890,7 +888,7 @@ class TTest(Test):
> self._testtmp, 0, self._getenv())
> stdout, stderr = proc.communicate()
> ret = proc.wait()
> - if wifexited(ret):
> + if os.WIFEXITED(ret):
> ret = os.WEXITSTATUS(ret)
> if ret == 2:
> print(stdout)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20150518/885b9015/attachment-0002.html>
More information about the Mercurial-devel
mailing list