[PATCH 004 of 179 tests-refactor] run-tests: move createenv() into Test

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed May 7 15:39:27 CDT 2014



On 05/02/2014 11:37 AM, Gregory Szorc wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc at gmail.com>
> # Date 1397938025 25200
> #      Sat Apr 19 13:07:05 2014 -0700
> # Branch stable
> # Node ID 71520e4115ab64e38cc872ec04044f37c747ffcf
> # Parent  b5da54671ef0204c48ce54715aa547cb1766fb7d
> run-tests: move createenv() into Test
>
> createenv() is consulting lots of test-specific variables. It makes
> sense to attach it to the Test class.
>

[…]

> @@ -606,16 +572,51 @@ class Test(object):
>                   (''.join(c.isalpha() and '[%s%s]' % (c.lower(), c.upper()) or
>                       c in '/\\' and r'[/\\]' or c.isdigit() and c or '\\' + c
>                       for c in self.testtmp), '$TESTTMP'))
>           else:
>               r.append((re.escape(self.testtmp), '$TESTTMP'))
>
>           return r, port
>
> +    def getenv(self, port):


This function wants a docstring too.

is methods needs a docstring.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list