fixed a problem with docstrings that were empty (None), docstrings in Jedi are always strings.

This commit is contained in:
Dave Halter
2014-03-06 12:20:11 +01:00
parent d12e030677
commit ca460ac34f
2 changed files with 10 additions and 1 deletions

View File

@@ -38,3 +38,12 @@ def test_parse_function_doc_illegal_docstr():
doesn't have a closing bracket.
"""
assert ('', '') == compiled._parse_function_doc(docstr)
def test_doc():
"""
Even CompiledObject docs always return empty docstrings - not None, that's
just a Jedi API definition.
"""
obj = compiled.CompiledObject(''.__getnewargs__)
assert obj.doc == ''