Skip to content

Commit 47c00d5

Browse files
committed
adds test coverage; removed old randome_move script
1 parent 717b26b commit 47c00d5

File tree

2 files changed

+10
-79
lines changed

2 files changed

+10
-79
lines changed

tests/opentrons/drivers/random_move.py

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

tests/opentrons/drivers/test_motor.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ def test_write_without_connection(self):
3535
self.motor.disconnect()
3636
self.assertRaises(RuntimeError, self.motor.calm_down)
3737

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+
3844
def test_version_compatible(self):
3945
self.robot.disconnect()
4046
self.robot.connect()
@@ -57,6 +63,9 @@ def test_version_compatible(self):
5763
}
5864
self.assertRaises(RuntimeError, self.robot.connect, **kwargs)
5965

66+
def test_invalid_coordinate_system(self):
67+
self.assertRaises(ValueError, self.motor.set_coordinate_system, 'andy')
68+
6069
def test_message_timeout(self):
6170
self.assertRaises(RuntimeWarning, self.motor.wait_for_response)
6271

@@ -135,6 +144,7 @@ def _move_head():
135144

136145
def test_get_position(self):
137146
self.motor.home()
147+
self.motor.ot_version = None
138148
self.motor.move_head(x=100)
139149
coords = self.motor.get_head_position()
140150
expected_coords = {

0 commit comments

Comments
 (0)