[PATCH 3 of 3] run-tests: use subprocess if available

Martin Geisler mg at lazybytes.net
Wed Apr 22 10:11:09 CDT 2009


Simon Heimberg <simohe at besonet.ch> writes:

> # HG changeset patch
> # User Simon Heimberg <simohe at besonet.ch>
> # Date 1240387309 -7200
> # Node ID dea489c31f301fd280b14bd06267d19fe8fed897
> # Parent  17587911270010be5e79b2a89c1b2e40bbeef905
> run-tests: use subprocess if available
>
> diff -r 175879112700 -r dea489c31f30 tests/run-tests.py
> --- a/tests/run-tests.py	Mit Apr 22 15:49:33 2009 +0200
> +++ b/tests/run-tests.py	Mit Apr 22 10:01:49 2009 +0200
> @@ -306,8 +306,7 @@
>  def run(cmd, options):
>      """Run command in a sub-process, capturing the output (stdout and stderr).
>      Return the exist code, and output."""
> -    # TODO: Use subprocess.Popen if we're running on Python 2.4
> -    if os.name == 'nt' or sys.platform.startswith('java'):
> +    if not subprocess and os.name == 'nt' or sys.platform.startswith('java'):

The next release will require Python 2.4 which comes with subprocess. So
the could be simpler, unless the above test really mean that Jython
don't have it?

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20090422/28e884e4/attachment.pgp 


More information about the Mercurial-devel mailing list