New testing framework

Antoine Pitrou solipsis at pitrou.net
Mon Jun 14 06:01:29 CDT 2010


Peter Arrenbrecht <peter.arrenbrecht <at> gmail.com> writes:
> 
> So I think that Patrick's Python-based mini-shell coupled with
> something like Matt's or my/Martin's approach is the better way
> forward. My take on this which I use with pbranch is very much like
> Martin's shelltest. But it uses a pipe to a single bash process for
> the entire script (which would be replaced with Patrick's mini-shell).
> This means it could actually keep stdout and stderr apart in the final
> output. (I have not investigated this yet, but my tests run about 3x
> slower on OS X than on Linux. Maybe this is because of the piping).

If you are using subprocess.Popen(), try setting the bufsize parameter to
something reasonable (e.g. 4096). subprocess uses unbuffered IO by default,
which can be very slow depending on the OS.

Regards

Antoine.




More information about the Mercurial-devel mailing list