Skip to content

Commit 47e6923

Browse files
committed
magicbot: Test empty string array feedback
1 parent 8d90817 commit 47e6923

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/test_magicbot_feedback.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ def get_float(self) -> float:
4444
def get_ints(self) -> Sequence[int]:
4545
return (0,)
4646

47+
@magicbot.feedback
48+
def get_empty_strings(self) -> Sequence[str]:
49+
return ()
50+
4751
def execute(self):
4852
pass
4953

@@ -56,7 +60,7 @@ def createObjects(self):
5660
pass
5761

5862

59-
def test_collect_feedbacks_with_type_hints():
63+
def test_feedbacks_with_type_hints():
6064
robot = Robot()
6165
robot.robotInit()
6266
nt = ntcore.NetworkTableInstance.getDefault().getTable("components")
@@ -70,6 +74,7 @@ def test_collect_feedbacks_with_type_hints():
7074
("type_hinted/int", "int", 0),
7175
("type_hinted/float", "double", 0.5),
7276
("type_hinted/ints", "int[]", [0]),
77+
("type_hinted/empty_strings", "string[]", []),
7378
):
7479
topic = nt.getTopic(name)
7580
assert topic.getTypeString() == type_str

0 commit comments

Comments
 (0)