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

Re: svn commit: r25447 - trunk/subversion/tests/cmdline/svntest

From: Daniel Rall <dlr_at_collab.net>
Date: 2007-06-29 21:45:01 CEST

On Wed, 27 Jun 2007, Lieven Govaerts wrote:

> Daniel Rall wrote:
> >
> >> --- trunk/subversion/tests/cmdline/svntest/main.py (original)
> >> +++ trunk/subversion/tests/cmdline/svntest/main.py Mon Jun 18 11:55:24 2007
> >> @@ -806,8 +806,11 @@
> >>
> >> self.result, self.stdout_lines, self.stderr_lines =\
> >> spawn_process(command, 1, None, *args)
> >> - sys.stdout.write('.')
> >> + # don't trust the exitcode, will not be correct on Windows
> >> + if filter(lambda x: x[:6] == 'FAIL: ', self.stdout_lines):
> >> + self.result = 1
> >> self.tests.append(self)
> >> + sys.stdout.write('.')
> >>
> >
> > How about x.startswith('FAIL: ') instead?
>
> Just checking, you realize that this doesn't help getting rid of the
> lambda, right? I personally find the above easier to read, but either is
> fine by me.

lambda() has to stay for the filter() input. I tend to prefer
well-named API usage to array slices, but if the longer API name wraps
the line, I'd call it a toss-up. *shrug*

  • application/pgp-signature attachment: stored
Received on Fri Jun 29 21:45:02 2007

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