Commit f1fd6b0
committed
Fix Tello test failure on CI by checking Tello identity instead of flag
Change TelloSource.__init__ to check `Tello is None` instead of
`not TELLO_AVAILABLE`. This resolves a CI-specific failure where
the class-level @patch("src.tello_source.TELLO_AVAILABLE", True)
decorator wasn't consistently applying before the first test method
ran (test_commands_disabled_by_config, alphabetically first).
The new check works naturally with @patch("src.tello_source.Tello")
since the mock replaces Tello with a MagicMock (not None), so the
guard passes without needing a separate TELLO_AVAILABLE patch.
Removed all @patch("src.tello_source.TELLO_AVAILABLE", True)
decorators from tests that already patch Tello. Updated
test_creation_without_djitellopy to patch Tello to None instead.
https://claude.ai/code/session_012XY2M4e4QuJnMcVhA2Zicx1 parent 154826e commit f1fd6b0
2 files changed
Lines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
| |||
397 | 396 | | |
398 | 397 | | |
399 | 398 | | |
400 | | - | |
401 | 399 | | |
402 | 400 | | |
403 | 401 | | |
| |||
411 | 409 | | |
412 | 410 | | |
413 | 411 | | |
414 | | - | |
415 | 412 | | |
416 | 413 | | |
417 | 414 | | |
| |||
426 | 423 | | |
427 | 424 | | |
428 | 425 | | |
429 | | - | |
| 426 | + | |
430 | 427 | | |
431 | 428 | | |
432 | 429 | | |
| |||
437 | 434 | | |
438 | 435 | | |
439 | 436 | | |
440 | | - | |
441 | 437 | | |
442 | 438 | | |
443 | 439 | | |
| |||
0 commit comments