@@ -34,73 +34,73 @@ class TestFizzBuzzWorkspace:
3434 # "cpython"
3535 # }
3636
37- # def test_local_hover(self, fizzbuzz_workspace):
38- # uri = "file:///fizzbuzz_service/loopers/number_looper.py"
39- # line, col = 2, 7
40- # result = fizzbuzz_workspace.hover(uri, line, col)
41- # assert result == {
42- # 'contents': [
43- # {
44- # 'language': 'python',
45- # 'value': 'class NumberLooper(param start, param end)'
46- # },
47- # 'Very important class that is capable of gathering all the number strings '
48- # 'in [start, end)'
49- # ]
50- # }
37+ def test_local_hover (self , fizzbuzz_workspace ):
38+ uri = "file:///fizzbuzz_service/loopers/number_looper.py"
39+ line , col = 2 , 7
40+ result = fizzbuzz_workspace .hover (uri , line , col )
41+ assert result == {
42+ 'contents' : [
43+ {
44+ 'language' : 'python' ,
45+ 'value' : 'class NumberLooper(param start, param end)'
46+ },
47+ 'Very important class that is capable of gathering all the number strings '
48+ 'in [start, end)'
49+ ]
50+ }
5151
52- # def test_local_package_cross_module_hover(self, fizzbuzz_workspace):
53- # uri = "file:///fizzbuzz_service/string_deciders/number_decider.py"
54- # line, col = 4, 22
55- # result = fizzbuzz_workspace.hover(uri, line, col)
56-
57- # assert result == {
58- # 'contents': [
59- # {
60- # 'language': 'python',
61- # 'value': 'def decide_output_for_number(param number)'
62- # },
63- # 'Decides the output for a given number'
64- # ]
65- # }
52+ def test_local_package_cross_module_hover (self , fizzbuzz_workspace ):
53+ uri = "file:///fizzbuzz_service/string_deciders/number_decider.py"
54+ line , col = 4 , 22
55+ result = fizzbuzz_workspace .hover (uri , line , col )
6656
67- # def test_cross_package_hover(self, fizzbuzz_workspace):
68- # uri = "file:///fizzbuzz_service/checkers/fizzbuzz/fizzbuzz_checker.py"
69- # line, col = 5, 31
70- # result = fizzbuzz_workspace.hover(uri, line, col)
71- # assert result == {
72- # 'contents': [
73- # {
74- # 'language': 'python',
75- # 'value': 'def should_fizz(param number)'
76- # },
77- # 'Whether or not "fizz" should be printed for this number'
78- # ]
79- # }
57+ assert result == {
58+ 'contents' : [
59+ {
60+ 'language' : 'python' ,
61+ 'value' : 'def decide_output_for_number(param number)'
62+ },
63+ 'Decides the output for a given number'
64+ ]
65+ }
8066
81- # def test_std_lib_hover(self, fizzbuzz_workspace):
82- # uri = "file:///fizzbuzz_service/__main__.py"
83- # line, col = 5, 10
84- # result = fizzbuzz_workspace.hover(uri, line, col)
85- # assert result == {
86- # 'contents': [
87- # {
88- # 'language': 'python',
89- # 'value': 'def print(param value, param ..., param sep, param '
90- # 'end, param file, param flush)'
91- # },
92- # "print(value, ..., sep=' ', end='\\n', file=sys.stdout, "
93- # 'flush=False)\n'
94- # '\n'
95- # 'Prints the values to a stream, or to sys.stdout by default.\n'
96- # 'Optional keyword arguments:\n'
97- # 'file: a file-like object (stream); defaults to the current '
98- # 'sys.stdout.\n'
99- # 'sep: string inserted between values, default a space.\n'
100- # 'end: string appended after the last value, default a newline.\n'
101- # 'flush: whether to forcibly flush the stream.'
102- # ]
103- # }
67+ def test_cross_package_hover (self , fizzbuzz_workspace ):
68+ uri = "file:///fizzbuzz_service/checkers/fizzbuzz/fizzbuzz_checker.py"
69+ line , col = 5 , 31
70+ result = fizzbuzz_workspace .hover (uri , line , col )
71+ assert result == {
72+ 'contents' : [
73+ {
74+ 'language' : 'python' ,
75+ 'value' : 'def should_fizz(param number)'
76+ },
77+ 'Whether or not "fizz" should be printed for this number'
78+ ]
79+ }
80+
81+ def test_std_lib_hover (self , fizzbuzz_workspace ):
82+ uri = "file:///fizzbuzz_service/__main__.py"
83+ line , col = 5 , 10
84+ result = fizzbuzz_workspace .hover (uri , line , col )
85+ assert result == {
86+ 'contents' : [
87+ {
88+ 'language' : 'python' ,
89+ 'value' : 'def print(param value, param ..., param sep, param '
90+ 'end, param file, param flush)'
91+ },
92+ "print(value, ..., sep=' ', end='\\ n', file=sys.stdout, "
93+ 'flush=False)\n '
94+ '\n '
95+ 'Prints the values to a stream, or to sys.stdout by default.\n '
96+ 'Optional keyword arguments:\n '
97+ 'file: a file-like object (stream); defaults to the current '
98+ 'sys.stdout.\n '
99+ 'sep: string inserted between values, default a space.\n '
100+ 'end: string appended after the last value, default a newline.\n '
101+ 'flush: whether to forcibly flush the stream.'
102+ ]
103+ }
104104
105105 # def test_local_defintion(self, fizzbuzz_workspace):
106106 # uri = "/fizzbuzz_service/string_deciders/number_decision.py"
0 commit comments