[py-dev] py.test TypeError
Simon Burton
simon at arrowtheory.com
Tue Jun 16 22:27:34 CEST 2009
____________________________________________________________________ FAILURES _____________________________________________________________________
self = <CollectorRunner colitem=<Instance '()'>>
def run(self):
""" return result of running setup, execution, teardown procedures. """
excinfo = None
res = NORESULT
capture = self.getcapture()
try:
try:
when = "setup"
self.setup()
try:
> res = self.execute()
/home/simon/local/pypy/py/test/runner.py:37:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <CollectorRunner colitem=<Instance '()'>>
def execute(self):
> return self.colitem._memocollect()
/home/simon/local/pypy/py/test/runner.py:76:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Instance '()'>
def _memocollect(self):
""" internal helper method to cache results of calling collect(). """
> return self._memoizedcall('_collected', self.collect)
/home/simon/local/pypy/py/test/collect.py:350:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Instance '()'>, attrname = '_collected', function = <bound method Instance.collect of <Instance '()'>>
def _memoizedcall(self, attrname, function):
exattrname = "_ex_" + attrname
failure = getattr(self, exattrname, None)
if failure is not None:
raise failure[0], failure[1], failure[2]
if hasattr(self, attrname):
return getattr(self, attrname)
try:
> res = function()
/home/simon/local/pypy/py/test/collect.py:146:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Instance '()'>
def collect(self):
l = self._deprecated_collect()
if l is not None:
return l
> name2items = self._buildname2items()
/home/simon/local/pypy/py/test/pycollect.py:115:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Instance '()'>
def _buildname2items(self):
# NB. we avoid random getattrs and peek in the __dict__ instead
d = {}
> dicts = [getattr(self.obj, '__dict__', {})]
/home/simon/local/pypy/py/test/pycollect.py:123:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Instance '()'>
def fget(self):
try:
return self._obj
except AttributeError:
> self._obj = obj = self._getobj()
/home/simon/local/pypy/py/test/pycollect.py:30:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Instance '()'>
def _getobj(self):
> return self.parent.obj()
E TypeError: function takes exactly 1 argument (0 given)
/home/simon/local/pypy/py/test/pycollect.py:219: TypeError
More information about the Pytest-dev
mailing list