mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-16 02:27:06 +08:00
print isn't in pydoc_topics -> ignore
This commit is contained in:
@@ -80,4 +80,7 @@ def imitate_pydoc(string):
|
||||
except TypeError:
|
||||
return ''
|
||||
|
||||
return pydoc_topics.topics[label] if pydoc_topics else ''
|
||||
try:
|
||||
return pydoc_topics.topics[label] if pydoc_topics else ''
|
||||
except KeyError:
|
||||
return ''
|
||||
|
||||
@@ -18,7 +18,9 @@ import api
|
||||
|
||||
|
||||
class Base(unittest.TestCase):
|
||||
def get_def(self, src, pos):
|
||||
def get_def(self, src, pos=None):
|
||||
if pos is None:
|
||||
pos = 1, len(src)
|
||||
script = api.Script(src, pos[0], pos[1], None)
|
||||
return script.get_definition()
|
||||
|
||||
@@ -254,6 +256,11 @@ class TestRegression(Base):
|
||||
types = [o.type for o in objs]
|
||||
assert 'Import' not in types and 'Class' in types
|
||||
|
||||
def test_keyword_definition_doc(self):
|
||||
""" github jedi-vim issue #44 """
|
||||
defs = self.get_def("print")
|
||||
assert [d.doc for d in defs]
|
||||
|
||||
|
||||
class TestFeature(Base):
|
||||
def test_full_name(self):
|
||||
|
||||
Reference in New Issue
Block a user