[TIP] Nose bug? using inspect.ismethod too aggressive?

Robert Collins robertc at robertcollins.net
Sun Sep 20 00:34:45 PDT 2009


On Sat, 2009-09-19 at 23:05 -0700, Fernando Perez wrote:
> Hi all,
> ...

> It seems to me that this is a nose bug, fixable with:
> 
> -            if not ismethod(item):
> +            if not hasattr(item,'__call__'):
> 
> I'll try to monkeypatch it in the meantime, but it would be great to
> have this done upstream, if it's indeed seen as a bug.

if not callable(item):
   ...

would be better, I think?

Also, is your code around? testscenarios is my alternative-approach to
test parameterisation, I'd like to see how you made generators
compatible with unittest. I'm guessing a TestSuite that acts as an
adapter.

-Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.idyll.org/pipermail/testing-in-python/attachments/20090920/5ec1512a/attachment.pgp 


More information about the testing-in-python mailing list