1
0
forked from VimPlug/jedi

add a Documentation() class to the API, which will be used in the future for all kind of docstrings. Also add a documentation method on BaseDefinition that returns a Documentation object. Deprecate at the same time its doc and raw_doc functions

This commit is contained in:
Dave Halter
2014-03-25 02:14:34 +01:00
parent fa664534e4
commit 3f3788e800
3 changed files with 44 additions and 16 deletions

View File

@@ -93,7 +93,7 @@ def test_function_call_signature_in_doc():
pass
f""").goto_definitions()
doc = defs[0].doc
assert "f(x, y = 1, z = 'a')" in doc
assert "f(x, y = 1, z = 'a')" in str(doc)
def test_class_call_signature():
@@ -103,7 +103,7 @@ def test_class_call_signature():
pass
Foo""").goto_definitions()
doc = defs[0].doc
assert "Foo(self, x, y = 1, z = 'a')" in doc
assert "Foo(self, x, y = 1, z = 'a')" in str(doc)
def test_position_none_if_builtin():