mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-23 05:41:27 +08:00
Remove some skips around attribute docstrings
This commit is contained in:
@@ -9,7 +9,7 @@ from textwrap import dedent
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
import jedi
|
import jedi
|
||||||
from ..helpers import unittest, test_dir
|
from ..helpers import test_dir
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import numpydoc # NOQA
|
import numpydoc # NOQA
|
||||||
@@ -69,25 +69,14 @@ def test_instance_doc(Script):
|
|||||||
assert defs[0].docstring() == 'Docstring of `TestClass`.'
|
assert defs[0].docstring() == 'Docstring of `TestClass`.'
|
||||||
|
|
||||||
|
|
||||||
@unittest.skip('need inference_state class for that')
|
|
||||||
def test_attribute_docstring(Script):
|
|
||||||
defs = Script("""
|
|
||||||
x = None
|
|
||||||
'''Docstring of `x`.'''
|
|
||||||
x""").infer()
|
|
||||||
assert defs[0].docstring() == 'Docstring of `x`.'
|
|
||||||
|
|
||||||
|
|
||||||
@unittest.skip('need inference_state class for that')
|
|
||||||
def test_multiple_docstrings(Script):
|
def test_multiple_docstrings(Script):
|
||||||
defs = Script("""
|
d, = Script("""
|
||||||
def func():
|
def func():
|
||||||
'''Original docstring.'''
|
'''Original docstring.'''
|
||||||
x = func
|
x = func
|
||||||
'''Docstring of `x`.'''
|
'''Docstring of `x`.'''
|
||||||
x""").infer()
|
x""").help()
|
||||||
docs = [d.docstring() for d in defs]
|
assert d.docstring() == 'Docstring of `x`.'
|
||||||
assert docs == ['Original docstring.', 'Docstring of `x`.']
|
|
||||||
|
|
||||||
|
|
||||||
def test_completion(Script):
|
def test_completion(Script):
|
||||||
|
|||||||
Reference in New Issue
Block a user