Skip to content

Commit 07ad2df

Browse files
committed
Add test
1 parent bc6e6d6 commit 07ad2df

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/test_command_schedule.py

+13
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,16 @@ def test_notScheduledCancel(scheduler: commands2.CommandScheduler):
8888
command = commands2.Command()
8989

9090
scheduler.cancel(command)
91+
92+
def test_getAllSubystems(scheduler: commands2.CommandScheduler):
93+
sub1 = commands2.Subsystem()
94+
sub1.setName("test123")
95+
sub2 = commands2.Subsystem()
96+
sub2.setName("hey")
97+
start_spying_on(sub1)
98+
start_spying_on(sub2)
99+
scheduler.registerSubsystem(sub1)
100+
scheduler.registerSubsystem(sub2)
101+
sublist = scheduler.getAllSubsystems()
102+
assert sublist[0].getName() == "test123"
103+
assert sublist[1].getName() == "hey"

0 commit comments

Comments
 (0)