mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-07-28 04:07:46 +00:00
pybricks.hubs: Move .ble to BLERadio.
Follows upstream firmware change. Update tests and examples too.
This commit is contained in:
@@ -32,7 +32,6 @@ def test_hub_dot():
|
||||
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
|
||||
assert [c["insertText"] for c in completions] == [
|
||||
"battery",
|
||||
"ble",
|
||||
"buttons",
|
||||
"light",
|
||||
"system",
|
||||
@@ -81,15 +80,3 @@ def test_hub_dot_system_dot():
|
||||
"shutdown",
|
||||
"storage",
|
||||
]
|
||||
|
||||
|
||||
def test_hub_dot_ble_dot():
|
||||
line = "hub.ble."
|
||||
code = _create_snippet(line)
|
||||
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
|
||||
assert [c["insertText"] for c in completions] == [
|
||||
"broadcast",
|
||||
"observe",
|
||||
"signal_strength",
|
||||
"version",
|
||||
]
|
||||
|
||||
@@ -32,7 +32,6 @@ def test_hub_dot():
|
||||
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
|
||||
assert [c["insertText"] for c in completions] == [
|
||||
"battery",
|
||||
"ble",
|
||||
"buttons",
|
||||
"charger",
|
||||
"imu",
|
||||
@@ -113,15 +112,3 @@ def test_hub_dot_system_dot():
|
||||
"shutdown",
|
||||
"storage",
|
||||
]
|
||||
|
||||
|
||||
def test_hub_dot_ble_dot():
|
||||
line = "hub.ble."
|
||||
code = _create_snippet(line)
|
||||
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
|
||||
assert [c["insertText"] for c in completions] == [
|
||||
"broadcast",
|
||||
"observe",
|
||||
"signal_strength",
|
||||
"version",
|
||||
]
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
Tests for correct code completion of the InventorHub class.
|
||||
"""
|
||||
|
||||
|
||||
import json
|
||||
from pybricks_jedi import complete, CompletionItem
|
||||
|
||||
@@ -39,5 +38,4 @@ from test_complete_prime_hub import ( # noqa F401
|
||||
test_hub_dot_light_dot,
|
||||
test_hub_dot_speaker_dot,
|
||||
test_hub_dot_system_dot,
|
||||
test_hub_dot_ble_dot,
|
||||
)
|
||||
|
||||
@@ -32,7 +32,6 @@ def test_hub_dot():
|
||||
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
|
||||
assert [c["insertText"] for c in completions] == [
|
||||
"battery",
|
||||
"ble",
|
||||
"buttons",
|
||||
"imu",
|
||||
"light",
|
||||
@@ -93,15 +92,3 @@ def test_hub_dot_system_dot():
|
||||
"shutdown",
|
||||
"storage",
|
||||
]
|
||||
|
||||
|
||||
def test_hub_dot_ble_dot():
|
||||
line = "hub.ble."
|
||||
code = _create_snippet(line)
|
||||
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
|
||||
assert [c["insertText"] for c in completions] == [
|
||||
"broadcast",
|
||||
"observe",
|
||||
"signal_strength",
|
||||
"version",
|
||||
]
|
||||
|
||||
@@ -32,7 +32,6 @@ def test_hub_dot():
|
||||
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
|
||||
assert [c["insertText"] for c in completions] == [
|
||||
"battery",
|
||||
"ble",
|
||||
"buttons",
|
||||
"charger",
|
||||
"display",
|
||||
@@ -142,15 +141,3 @@ def test_hub_dot_system_dot():
|
||||
"shutdown",
|
||||
"storage",
|
||||
]
|
||||
|
||||
|
||||
def test_hub_dot_ble_dot():
|
||||
line = "hub.ble."
|
||||
code = _create_snippet(line)
|
||||
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
|
||||
assert [c["insertText"] for c in completions] == [
|
||||
"broadcast",
|
||||
"observe",
|
||||
"signal_strength",
|
||||
"version",
|
||||
]
|
||||
|
||||
@@ -32,7 +32,6 @@ def test_hub_dot():
|
||||
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
|
||||
assert [c["insertText"] for c in completions] == [
|
||||
"battery",
|
||||
"ble",
|
||||
"buttons",
|
||||
"imu",
|
||||
"light",
|
||||
@@ -101,15 +100,3 @@ def test_hub_dot_system_dot():
|
||||
"shutdown",
|
||||
"storage",
|
||||
]
|
||||
|
||||
|
||||
def test_hub_dot_ble_dot():
|
||||
line = "hub.ble."
|
||||
code = _create_snippet(line)
|
||||
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
|
||||
assert [c["insertText"] for c in completions] == [
|
||||
"broadcast",
|
||||
"observe",
|
||||
"signal_strength",
|
||||
"version",
|
||||
]
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
Tests for correct signatures of the pupdevices.Motor class.
|
||||
"""
|
||||
|
||||
|
||||
from itertools import zip_longest
|
||||
import json
|
||||
|
||||
@@ -88,20 +87,15 @@ CONSTRUCTOR_PARAMS = [
|
||||
"MoveHub",
|
||||
[
|
||||
[
|
||||
"broadcast_channel: Optional[int]=None",
|
||||
"observe_channels: Sequence[int]=[]",
|
||||
"top_side: Axis=Axis.Z",
|
||||
"front_side: Axis=Axis.X",
|
||||
]
|
||||
],
|
||||
),
|
||||
pytest.param(
|
||||
"pybricks.hubs",
|
||||
"CityHub",
|
||||
[
|
||||
[
|
||||
"broadcast_channel: Optional[int]=None",
|
||||
"observe_channels: Sequence[int]=[]",
|
||||
]
|
||||
],
|
||||
[[]],
|
||||
),
|
||||
pytest.param(
|
||||
"pybricks.hubs",
|
||||
@@ -110,8 +104,6 @@ CONSTRUCTOR_PARAMS = [
|
||||
[
|
||||
"top_side: Axis=Axis.Z",
|
||||
"front_side: Axis=Axis.X",
|
||||
"broadcast_channel: Optional[int]=None",
|
||||
"observe_channels: Sequence[int]=[]",
|
||||
]
|
||||
],
|
||||
),
|
||||
@@ -122,8 +114,6 @@ CONSTRUCTOR_PARAMS = [
|
||||
[
|
||||
"top_side: Axis=Axis.Z",
|
||||
"front_side: Axis=Axis.X",
|
||||
"broadcast_channel: Optional[int]=None",
|
||||
"observe_channels: Sequence[int]=[]",
|
||||
]
|
||||
],
|
||||
),
|
||||
@@ -134,8 +124,6 @@ CONSTRUCTOR_PARAMS = [
|
||||
[
|
||||
"top_side: Axis=Axis.Z",
|
||||
"front_side: Axis=Axis.X",
|
||||
"broadcast_channel: Optional[int]=None",
|
||||
"observe_channels: Sequence[int]=[]",
|
||||
]
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user