Beispiel #1
0
class TestGripper(TestCase):

    def setUp(self):
        self.gripper = Gripper()

    def test_grip(self):
        if self.gripper.state != 'released':
            self.gripper.release().join()

        self.gripper.grip().join()
        self.assertEqual('gripped', self.gripper.state)
        self.assertRaises(TransitionNotAllowed, self.gripper.grip().join)

    def test_release(self):
        if self.gripper.state != 'gripped':
            self.gripper.grip().join()

        self.gripper.release().join()
        self.assertEqual('released', self.gripper.state)
        self.assertRaises(TransitionNotAllowed, self.gripper.release().join)
Beispiel #2
0
 def setUp(self):
     self.gripper = Gripper()
Beispiel #3
0
 def setUp(self):
     self.gripper = Gripper()