selftest should continue after skip even if --one

Robert Collins robertc at robertcollins.net
Thu Jan 26 21:41:10 GMT 2006


On Thu, 2006-01-26 at 15:26 -0600, John A Meinel wrote:
> Robert Collins wrote:
> > On Thu, 2006-01-26 at 11:45 -0600, John A Meinel wrote:
> >> Robert brought up this bug a while ago, I decided to fix it, and the fix
> >> is in my 'jam-pending' branch revno:1511
> >>
> >> Basically, the problem was that EarlyStoppingAdapter was being wrapped
> >> around _MyResult, which was causing _result.stop() to be called, before
> >> _MyResult could realize that it was a SKIP.
> >>
> >> I realized that since we use _MyResult anyway, we don't really need the
> >> EarlyStopping adapter. I don't know if we would want it for other front
> >> ends, but I don't know that other front ends would support the stop
> >> early request anyway.
> >>
> >> So attached is the patch which fixes it.
> >>
> >> Aaron, can you review my jam-pending branch? I put the paramiko fix in
> >> there as well.
> > 
> > FWIW its already fixed in branch-formats.
> > 
> > Rob
> > 
> 
> How did you fix it? I don't want to conflict with your fix.

Its important to remember that _MyResult is -only- the result used
by ./bzr selftest - gui test runs for instance do not use our testresult
object.

--- bzrlib/tests/__init__.py    
+++ bzrlib/tests/__init__.py    
@@ -77,6 +88,9 @@
         self._result = result
 
     def addError(self, test, err):
+        if (isinstance(err[1], TestSkipped) and 
+            getattr(self, "addSkipped", None) is not None):
+            return self.addSkipped(test, err)    
         self._result.addError(test, err)
         self._result.stop()


Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060127/fca0df7f/attachment.pgp 


More information about the bazaar mailing list