Skip to content

Commit a09080b

Browse files
authored
Merge pull request #10 from dronefreak/claude/analyze-codebase-EKB1m
Claude/analyze codebase ekb1m
2 parents 3349bae + f1fd6b0 commit a09080b

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

src/tello_source.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def __init__(self, config: Config):
3535
"""
3636
super().__init__()
3737

38-
if not TELLO_AVAILABLE:
38+
if Tello is None:
3939
raise ImportError(
4040
"djitellopy is required for Tello support. Install with: pip install djitellopy"
4141
)

tests/test_tello_interface.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ def test_import_without_djitellopy(self):
4040
pass # Expected if djitellopy truly not available
4141

4242

43-
@patch("src.tello_source.TELLO_AVAILABLE", True)
4443
@patch("src.tello_source.Tello")
4544
class TestTelloSource(unittest.TestCase):
4645
"""Test TelloSource class with mocked Tello."""
@@ -397,7 +396,6 @@ def test_release_while_flying(self, mock_tello_class):
397396
class TestTelloEdgeCases(unittest.TestCase):
398397
"""Test edge cases for Tello source."""
399398

400-
@patch("src.tello_source.TELLO_AVAILABLE", True)
401399
@patch("src.tello_source.Tello")
402400
def test_read_without_opening(self, mock_tello_class):
403401
"""Test reading before opening connection."""
@@ -411,7 +409,6 @@ def test_read_without_opening(self, mock_tello_class):
411409
self.assertFalse(success)
412410
self.assertIsNone(frame)
413411

414-
@patch("src.tello_source.TELLO_AVAILABLE", True)
415412
@patch("src.tello_source.Tello")
416413
def test_commands_without_opening(self, mock_tello_class):
417414
"""Test sending commands before opening."""
@@ -426,7 +423,7 @@ def test_commands_without_opening(self, mock_tello_class):
426423

427424
mock_tello_class.assert_not_called()
428425

429-
@patch("src.tello_source.TELLO_AVAILABLE", False)
426+
@patch("src.tello_source.Tello", None)
430427
def test_creation_without_djitellopy(self):
431428
"""Test that creation fails gracefully without djitellopy."""
432429
from src.tello_source import TelloSource
@@ -437,7 +434,6 @@ def test_creation_without_djitellopy(self):
437434
TelloSource(config)
438435

439436

440-
@patch("src.tello_source.TELLO_AVAILABLE", True)
441437
@patch("src.tello_source.Tello")
442438
class TestTelloSafetyFeatures(unittest.TestCase):
443439
"""Test safety features for Tello source."""

0 commit comments

Comments
 (0)