File tree Expand file tree Collapse file tree 2 files changed +10
-79
lines changed Expand file tree Collapse file tree 2 files changed +10
-79
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -35,6 +35,12 @@ def test_write_without_connection(self):
35
35
self .motor .disconnect ()
36
36
self .assertRaises (RuntimeError , self .motor .calm_down )
37
37
38
+ def test_write_with_lost_connection (self ):
39
+ old_method = self .motor .is_connected
40
+ self .motor .is_connected = lambda : False
41
+ self .assertRaises (RuntimeError , self .motor .calm_down )
42
+ self .motor .is_connected = old_method
43
+
38
44
def test_version_compatible (self ):
39
45
self .robot .disconnect ()
40
46
self .robot .connect ()
@@ -57,6 +63,9 @@ def test_version_compatible(self):
57
63
}
58
64
self .assertRaises (RuntimeError , self .robot .connect , ** kwargs )
59
65
66
+ def test_invalid_coordinate_system (self ):
67
+ self .assertRaises (ValueError , self .motor .set_coordinate_system , 'andy' )
68
+
60
69
def test_message_timeout (self ):
61
70
self .assertRaises (RuntimeWarning , self .motor .wait_for_response )
62
71
@@ -135,6 +144,7 @@ def _move_head():
135
144
136
145
def test_get_position (self ):
137
146
self .motor .home ()
147
+ self .motor .ot_version = None
138
148
self .motor .move_head (x = 100 )
139
149
coords = self .motor .get_head_position ()
140
150
expected_coords = {
You can’t perform that action at this time.
0 commit comments