-
Notifications
You must be signed in to change notification settings - Fork 255
Closed
Description
allure-python/allure-pytest/src/utils.py
Line 34 in 524beb8
| return getattr(item._obj, '__allure_display_name__', None) |
This code has come up in a pytest-mypy issue because ._obj (which seems to be available publicly as .obj, btw) is not defined on MypyItems (custom pytest.Items used for running mypy on collected modules). Moreover, I don't know of a way to reasonably define it since MypyItems are not associated with any particular test function. That suggests that perhaps allure-pytest should be made to ignore such Items or, in this case, at least gracefully degrade into returning None when allure_title is called on them:
try:
return item.obj.__allure_display_name__
except AttributeError:
return NoneReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels