Skip to content

Commit c2c4745

Browse files
committed
#610: Add test case that triggers the bug
1 parent 6439d9c commit c2c4745

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
"""
2+
This test represents a simple demo for testing.
3+
Feel free to copy and modify at your leisure.
4+
"""
5+
6+
import time
7+
import sys
8+
import os
9+
from dronekit import connect, VehicleMode
10+
from dronekit.test import with_sitl
11+
from nose.tools import assert_equals
12+
13+
@with_sitl
14+
def test_timeout(connpath):
15+
v = connect(connpath)
16+
17+
# Set the vehicle and autopilot type to 'unsupported' types that MissionPlanner uses as of 17.Apr.2016
18+
v._vehicle_type = 6
19+
v._autopilot_type = 8
20+
21+
# The above types trigger 'TypeError: argument of type 'NoneType' is not iterable' which is addressed in issue #610
22+
is_available = v._is_mode_available(0)
23+
24+
v.close()

0 commit comments

Comments
 (0)