-
Notifications
You must be signed in to change notification settings - Fork 252
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 MypyItem
s (custom pytest.Item
s used for running mypy
on collected modules). Moreover, I don't know of a way to reasonably define it since MypyItem
s are not associated with any particular test function. That suggests that perhaps allure-pytest
should be made to ignore such Item
s 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 None
Nusnus and vgorkavenkoNusnus
Metadata
Metadata
Assignees
Labels
No labels