Skip to content

Commit a53f371

Browse files
committed
jedi: Add tests for methods on hub.ble.
1 parent 3850353 commit a53f371

6 files changed

Lines changed: 66 additions & 0 deletions

jedi/tests/test_complete_city_hub.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,16 @@ def test_hub_dot_system_dot():
8282
"shutdown",
8383
"storage",
8484
]
85+
86+
87+
def test_hub_dot_ble_dot():
88+
line = "hub.ble."
89+
code = _create_snippet(line)
90+
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
91+
assert [c["insertText"] for c in completions] == [
92+
"broadcast",
93+
"observe",
94+
"observe_enable",
95+
"signal_strength",
96+
"version",
97+
]

jedi/tests/test_complete_essential_hub.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,16 @@ def test_hub_dot_system_dot():
114114
"shutdown",
115115
"storage",
116116
]
117+
118+
119+
def test_hub_dot_ble_dot():
120+
line = "hub.ble."
121+
code = _create_snippet(line)
122+
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
123+
assert [c["insertText"] for c in completions] == [
124+
"broadcast",
125+
"observe",
126+
"observe_enable",
127+
"signal_strength",
128+
"version",
129+
]

jedi/tests/test_complete_inventor_hub.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ def _create_snippet(line: str) -> str:
3939
test_hub_dot_light_dot,
4040
test_hub_dot_speaker_dot,
4141
test_hub_dot_system_dot,
42+
test_hub_dot_ble_dot,
4243
)

jedi/tests/test_complete_move_hub.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,16 @@ def test_hub_dot_system_dot():
9494
"shutdown",
9595
"storage",
9696
]
97+
98+
99+
def test_hub_dot_ble_dot():
100+
line = "hub.ble."
101+
code = _create_snippet(line)
102+
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
103+
assert [c["insertText"] for c in completions] == [
104+
"broadcast",
105+
"observe",
106+
"observe_enable",
107+
"signal_strength",
108+
"version",
109+
]

jedi/tests/test_complete_prime_hub.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,16 @@ def test_hub_dot_system_dot():
143143
"shutdown",
144144
"storage",
145145
]
146+
147+
148+
def test_hub_dot_ble_dot():
149+
line = "hub.ble."
150+
code = _create_snippet(line)
151+
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
152+
assert [c["insertText"] for c in completions] == [
153+
"broadcast",
154+
"observe",
155+
"observe_enable",
156+
"signal_strength",
157+
"version",
158+
]

jedi/tests/test_complete_technic_hub.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,16 @@ def test_hub_dot_system_dot():
102102
"shutdown",
103103
"storage",
104104
]
105+
106+
107+
def test_hub_dot_ble_dot():
108+
line = "hub.ble."
109+
code = _create_snippet(line)
110+
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
111+
assert [c["insertText"] for c in completions] == [
112+
"broadcast",
113+
"observe",
114+
"observe_enable",
115+
"signal_strength",
116+
"version",
117+
]

0 commit comments

Comments
 (0)