File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,10 +51,11 @@ def foo(a, b=None):
5151 func_def = matches [0 ]
5252
5353 assert isinstance (func_def , cst .FunctionDef )
54- docstring_node = _get_docstring_node (func_def )
54+ docstring_node , docstring_result = _get_docstring_node (func_def )
5555
5656 assert isinstance (docstring_node , cst .SimpleString )
5757 assert docstring_node .value == docstring
58+ assert docstring_result == docstring .strip ('"' )
5859
5960 def test_func_without_docstring (self ):
6061 code = '''
@@ -74,9 +75,10 @@ def foo(a, b=None):
7475 func_def = matches [0 ]
7576
7677 assert isinstance (func_def , cst .FunctionDef )
77- docstring_node = _get_docstring_node (func_def )
78+ docstring_node , docstring = _get_docstring_node (func_def )
7879
7980 assert docstring_node is None
81+ assert docstring is None
8082
8183
8284MODULE_ATTRIBUTE_TEMPLATE = '''\
You can’t perform that action at this time.
0 commit comments