[PATCH 006 of 179 tests-refactor] run-tests: move replacements and port management into Test
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Wed May 7 15:39:42 CDT 2014
On 05/02/2014 11:37 AM, Gregory Szorc wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc at gmail.com>
> # Date 1397938735 25200
> # Sat Apr 19 13:18:55 2014 -0700
> # Branch stable
> # Node ID 5c920a6f7ff39411402ab7910db7c1520ca550fb
> # Parent 27f7274d1694f92571e68c63696cead7658271eb
> run-tests: move replacements and port management into Test
>
> replacements and ports are really implementation details of a Test. They
> have been moved to instance variables.
>
> diff --git a/tests/run-tests.py b/tests/run-tests.py
> --- a/tests/run-tests.py
> +++ b/tests/run-tests.py
> @@ -540,57 +540,60 @@ def outputcoverage(options):
> adir = os.path.join(TESTDIR, 'annotated')
> if not os.path.isdir(adir):
> os.mkdir(adir)
> covrun('-i', '-a', '"--directory=%s"' % adir, '"--omit=%s"' % omit)
>
> class Test(object):
> """Encapsulates a single, runnable test."""
>
> - def __init__(self, path, options, threadtmp):
> + def __init__(self, path, options, threadtmp, count):
New undocumented variable. Pointing out the fact this __init__ method
have not docstring. Can you add one?
> self._path = path
> self._options = options
> self._threadtmp = threadtmp
It probably starts making sense to document each attributes too.
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list