[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Lots of test suite code

From: Greg Stein <gstein_at_lyra.org>
Date: 2001-05-09 02:55:56 CEST

On Tue, May 08, 2001 at 05:46:19PM -0500, Ben Collins-Sussman wrote:
> Sam TH <sam@uchicago.edu> writes:
>...
> > + if os.path.exists(os.path.join(path, "SVN/entries")):
> > + entry_path = os.path.join(path, "SVN/entries")
>
> Just a nit here: if you have a slash in the string, it kind of
> defeats the point of os.path.join. ;)

os.path.join(path, 'SVN', 'entries')

>...
> > + ignore_re = re.compile('^Commit.+')
> > +
> > for line in lines:
> > + if not((ignore_re.match(line)) is None):
> > + continue
>
> I'm not sure this is necessary... since my callers always deliberately
> look for a final "Commit succeeded" and pop it off the list before
> calling this routine. But I guess it doesn't hurt to make things more
> robust!

Stylistic nit on the above:

    if ignore_re.match(line) is not None:

Also, "not" is a unary operator, not a function, so at *least* put a space
after the "not" (the parens are needed here for binding, but they are not
always required).

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:30 2006

This is an archived mail posted to the Subversion Dev mailing list.