[py-dev] py.test + cython

Simon Burton simon at arrowtheory.com
Thu Nov 6 01:38:23 CET 2008


On Thu, 6 Nov 2008 09:31:12 +1100
Simon Burton <simon at arrowtheory.com> wrote:

...
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> 
>     def _getobj(self): 
> E       return self.parent.obj()  
> >       TypeError: __init__() takes exactly 2 arguments (1 given)
> 
> /home/simon/local/pypy/py/test/collect.py:436: TypeError


Aha! Looks like py.test is picking up a class that happened to have prefix Test.
It is not a unit test class (has no test_* methods); i just made sure it could be
constructed with one argument.

Simon.





More information about the Pytest-dev mailing list