diff --git a/opentrons/robot/robot.py b/opentrons/robot/robot.py index f12c6ba0d74..d8c57d715fe 100644 --- a/opentrons/robot/robot.py +++ b/opentrons/robot/robot.py @@ -478,6 +478,16 @@ def _do(): log.info('Executing: Home now') return _do() + def comment(self, description): + def _do(): + pass + + def _setup(): + pass + + c = Command(do=_do, setup=_setup, description=description) + self.add_command(c) + def add_command(self, command): if command.description: diff --git a/tests/opentrons/protocol/test_robot.py b/tests/opentrons/protocol/test_robot.py index e28a20ce978..4a7c4716c17 100644 --- a/tests/opentrons/protocol/test_robot.py +++ b/tests/opentrons/protocol/test_robot.py @@ -32,6 +32,12 @@ def test_add_container(self): } self.assertEquals(res, expected) + def test_comment(self): + self.robot.clear_commands() + self.robot.comment('hello') + self.assertEquals(len(self.robot.commands()), 1) + self.assertEquals(self.robot._commands[0].description, 'hello') + def test_home_after_disconnect(self): self.robot.disconnect() self.assertRaises(RuntimeError, self.robot.home)