Skip to content

Commit 81fee61

Browse files
authored
Merge pull request #91 from OpenTestSolar/bugfix/fix-parse-testcase-description-bug
修复解析用例描述信息时存在的问题
2 parents ffcbb8a + 61720da commit 81fee61

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎pytest/src/testsolar_pytestx/parser.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# - extra_attributes
2020
def parse_case_attributes(item: Item, comment_fields: Optional[List[str]] = None) -> Dict[str, str]:
2121
"""parse testcase attributes"""
22-
desc: str = (str(item.function.__doc__) or "").strip() # type: ignore
22+
desc: str = (str(item.function.__doc__) if item.function.__doc__ else "").strip() # type: ignore
2323
attributes: Dict[str, str] = {"description": desc}
2424
if comment_fields:
2525
attributes.update(scan_comment_fields(desc, comment_fields))

‎pytest/uv.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)