Skip to content

Commit 24c73d6

Browse files
committed
Fix type warning, remove redundant tests
1 parent 7bd7eda commit 24c73d6

File tree

2 files changed

+9
-210
lines changed

2 files changed

+9
-210
lines changed

src/tests/test_parallel.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/usr/bin/env python3
22
"""Test the simplified Parallel composite."""
33

4+
from typing import Optional
5+
46
from py_trees.behaviour import Behaviour
57
from py_trees.common import Status
68

@@ -10,7 +12,9 @@
1012
class MockBehaviour(Behaviour):
1113
"""Mock behaviour for testing."""
1214

13-
def __init__(self, name: str, return_status: Status, ticks_until_done: int = 1):
15+
def __init__(
16+
self, name: str, return_status: Status, ticks_until_done: int = 1
17+
) -> None:
1418
super().__init__(name)
1519
self.return_status = return_status
1620
self.ticks_until_done = ticks_until_done
@@ -23,7 +27,7 @@ def update(self) -> Status:
2327
return Status.RUNNING
2428

2529

26-
def test_all_success():
30+
def test_all_success() -> None:
2731
"""Test that parallel returns SUCCESS when all children succeed."""
2832
print("\n=== Test: All children succeed ===")
2933
parallel = ParallelBarrier(
@@ -53,7 +57,7 @@ def test_all_success():
5357
print("✓ Test passed!")
5458

5559

56-
def test_one_failure():
60+
def test_one_failure() -> None:
5761
"""Test that parallel returns FAILURE when one child fails."""
5862
print("\n=== Test: One child fails ===")
5963
parallel = ParallelBarrier(
@@ -83,7 +87,7 @@ def test_one_failure():
8387
print("✓ Test passed!")
8488

8589

86-
def test_synchronized_mode():
90+
def test_synchronized_mode() -> None:
8791
"""Test that converged children are skipped on subsequent ticks."""
8892
print("\n=== Test: Synchronized mode (skip converged children) ===")
8993

@@ -129,7 +133,7 @@ def test_synchronized_mode():
129133
print("✓ Test passed!")
130134

131135

132-
def test_empty_children():
136+
def test_empty_children() -> None:
133137
"""Test that parallel with no children returns SUCCESS."""
134138
print("\n=== Test: Empty children ===")
135139
parallel = ParallelBarrier("Test Parallel", children=[])

src/tests/test_parallel_integration.py

Lines changed: 0 additions & 205 deletions
This file was deleted.

0 commit comments

Comments
 (0)