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