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

Re: svn commit: rev 248 - trunk/subversion/tests/clients/cmdline/svntest

From: Roman Neuhauser <neuhauser_at_mobil.cz>
Date: 2001-10-17 16:36:34 CEST

> To: Greg Stein <gstein@lyra.org>
> Cc: dev@subversion.tigris.org
> From: Ben Collins-Sussman <sussman@collab.net>
> Date: 17 Oct 2001 08:25:19 -0500
> Subject: Re: svn commit: rev 248 - trunk/subversion/tests/clients/cmdline/svntest
> Greg Stein <gstein@lyra.org> writes:
> > I don't know the code here, but I'd recommend thinking things through a
> > *few* times if you ever find yourself using "except:"
> Well, here's the scenario.
> The main python routine loops over a list of tests, and runs each one.
> It does this by repeatedly calling a subroutine that executes exactly
> one test (a particular test number). This subroutine's job is to
> return a 1 or 0 to the main routine, indicating whether the test
> passed or failed. In the end, the main python routine remembers
> whether any tests failed.
> The problem is that we've defined particular kinds of execptions --
> SVNTreeUnequal, and others. Sometimes our code explicitly raises
> them. When this happens, python bombs out completely. We'd rather
> just have the test return an error code instead, so the next tests
> will run.
> So... should we simply be looking to trap a list of *particular*
> exceptions? Like all those that our code might be expected tot throw?
> And also, is there a way to catch an exception and *still* print the
> traceback before returning an error value?

   How about make _all_ tests throw an exception isntead of a return
   code? The tests could indicate what happened through error messages
   this way, right?


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:45 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.