Skip to content

Commit c892699

Browse files
PR for issue #277
For more information, please refer to my bug ticket
1 parent ba6dde3 commit c892699

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pytest_reportportal/service.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -700,8 +700,9 @@ def _get_item_description(test_item):
700700
:return string description
701701
"""
702702
if isinstance(test_item, (Class, Function, Module, Item)):
703-
doc = test_item.obj.__doc__
704-
if doc is not None:
705-
return trim_docstring(doc)
703+
if hasattr(test_item, "obj"):
704+
doc = test_item.obj.__doc__
705+
if doc is not None:
706+
return trim_docstring(doc)
706707
if isinstance(test_item, DoctestItem):
707708
return test_item.reportinfo()[2]

0 commit comments

Comments
 (0)