fix xfail

--HG--
branch : trunk
This commit is contained in:
Benjamin Peterson 2009-09-03 16:47:04 -05:00
parent 86da34b874
commit 1c9760d123
1 changed files with 2 additions and 2 deletions

View File

@ -22,8 +22,8 @@ import py
def pytest_runtest_makereport(__multicall__, item, call): def pytest_runtest_makereport(__multicall__, item, call):
if call.when != "call": if call.when != "call":
return return
if hasattr(item, 'obj') and hasattr(item.obj, 'func_dict'): if hasattr(item, 'obj') and py.builtin._getfuncdict(item.obj):
if 'xfail' in item.obj.func_dict: if 'xfail' in py.builtin._getfuncdict(item.obj):
res = __multicall__.execute() res = __multicall__.execute()
if call.excinfo: if call.excinfo:
res.skipped = True res.skipped = True