[PATCH] Another flapping python 3 test

Andreas Schneider asn at samba.org
Tue Oct 2 12:05:09 UTC 2018


On Tuesday, 2 October 2018 12:55:45 CEST Stefan Metzmacher wrote:
> Hi,
> 
> > the problem is that an unexpected "error" is generated,
> > knownfail can only catch unexpected "failures"...
> > 
> > With python this typically happens if we don't catch expections,
> > see python/samba/tests/__init__.py
> > 
> >                 ok = False
> >                 
> >                 try:
> >                     testMethod()
> >                     ok = True
> >                 
> >                 except SkipTest as e:
> >                     self._addSkip(result, str(e))
> >                     return
> >                 
> >                 except self.failureException:
> >                     result.addFailure(self, self._exc_info())
> >                 
> >                 except KeyboardInterrupt:
> >                     raise
> >                 
> >                 except:
> >                     result.addError(self, self._exc_info())
> > 
> > KCCTests.test_verify() needs to catch the
> > samba.kcc.graph_utils.GraphError exception and generate
> > a self.failureException exception, which typically happens with
> > the self.assert*() functions.
> 
> The attached patch turns it into an error for me.
> 
> Please review and push:-)

RB+ and pushed to master

-- 
Andreas Schneider                      asn at samba.org
Samba Team                             www.samba.org
GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D





More information about the samba-technical mailing list