@@ -20,6 +20,7 @@ def main():
2020
2121"""
2222
23+
2324def test_numpy_hover ():
2425 # Over the blank line
2526 no_hov_position = {'line' : 1 , 'character' : 0 }
@@ -35,28 +36,21 @@ def test_numpy_hover():
3536 doc = Document (DOC_URI , NUMPY_DOC )
3637
3738 if LooseVersion (_utils .JEDI_VERSION ) >= LooseVersion ('0.15.0' ):
38- contents = [
39- {'language' : 'python' , 'value' : 'numpy' },
40- 'NumPy\n =====\n \n Provides\n \xa0 \xa0 1. '
41- 'An array object of arbitrary homogeneous items\n \xa0 \xa0 2.' ]
42- assert contents in pyls_hover (doc , numpy_hov_position_1 )['contents' ]
43-
44- contents = [
45- {'language' : 'python' , 'value' : 'numpy' },
46- 'NumPy\n =====\n \n Provides\n \xa0 \xa0 1. '
47- 'An array object of arbitrary homogeneous items\n \xa0 \xa0 2.' ]
48- assert contents in pyls_hover (doc , numpy_hov_position_2 )['contents' ]
49-
50- contents = [
51- {'language' : 'python' , 'value' : 'numpy' },
52- 'NumPy\n =====\n \n Provides\n \xa0 \xa0 1. '
53- 'An array object of arbitrary homogeneous items\n \xa0 \xa0 2.' ]
54- assert contents in pyls_hover (doc , numpy_hov_position_3 )['contents' ]
55-
56- contents = [
57- {'language' : 'python' , 'value' : 'numpy' },
58- 'Trigonometric sine, element-wise.\n \n ' ]
59- assert contents in pyls_hover (doc , numpy_sin_hov_position )['contents' ]
39+ contents = ''
40+ assert contents in pyls_hover (doc , no_hov_position )['contents' ]
41+
42+ contents = 'NumPy\n =====\n \n Provides\n '
43+ assert contents in pyls_hover (doc , numpy_hov_position_1 )['contents' ][0 ]
44+
45+ contents = 'NumPy\n =====\n \n Provides\n '
46+ assert contents in pyls_hover (doc , numpy_hov_position_2 )['contents' ][0 ]
47+
48+ contents = 'NumPy\n =====\n \n Provides\n '
49+ assert contents in pyls_hover (doc , numpy_hov_position_3 )['contents' ][0 ]
50+
51+ contents = 'Trigonometric sine, element-wise.\n \n '
52+ assert contents in pyls_hover (
53+ doc , numpy_sin_hov_position )['contents' ][0 ]
6054
6155
6256def test_hover ():
0 commit comments