Skip to content

Commit 9859c11

Browse files
Ensure the docstring is a string
1 parent 5eaf820 commit 9859c11

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/_pytest/assertion/rewrite.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,7 @@ def run(self, mod: ast.Module) -> None:
687687
expect_docstring
688688
and isinstance(item, ast.Expr)
689689
and isinstance(item.value, astStr)
690+
and isinstance(item.value.value, str)
690691
):
691692
if sys.version_info >= (3, 8):
692693
doc = item.value.value

0 commit comments

Comments
 (0)