예제 #1
0
    def test_steps_make_step(self):
        """
        """

        sss = self.set_step_str.split(",")
        set_step_rstep = RecipeStep.fromList(sss)
        set_step_sstep = SetStep.fromList(sss)

        self.assertEqual(set_step_rstep, set_step_sstep)
        self.assertRaises(TypeError, WaitStep.fromList, sss)
        self.assertRaises(TypeError, WaitUntilStep.fromList, sss)

        wss = self.wait_step_str.split(",")
        wait_step_rstep = RecipeStep.fromList(wss)
        wait_step_wstep = WaitStep.fromList(wss)

        self.assertEqual(wait_step_rstep, wait_step_wstep)
        self.assertRaises(TypeError, SetStep.fromList, wss)
        self.assertRaises(TypeError, WaitUntilStep.fromList, wss)

        wuss = self.wait_until_step_str.split(",")
        wait_until_step_rstep = RecipeStep.fromList(wuss)
        wait_until_step_wstep = WaitUntilStep.fromList(wuss)

        self.assertEqual(wait_until_step_rstep, wait_until_step_wstep)
        self.assertRaises(TypeError, SetStep.fromList, wuss)
        self.assertRaises(TypeError, WaitStep.fromList, wuss)
예제 #2
0
    def test_steps_from_line(self):
        """
        """

        sss = self.set_step_str
        set_step_rstep = RecipeStep.fromLine(sss)
        set_step_sstep = SetStep.fromLine(sss)

        self.assertEqual(set_step_rstep, set_step_sstep)
        self.assertRaises(TypeError, WaitStep.fromLine, sss)
        self.assertRaises(TypeError, WaitUntilStep.fromLine, sss)

        wss = self.wait_step_str
        wait_step_rstep = RecipeStep.fromLine(wss)
        wait_step_wstep = WaitStep.fromLine(wss)

        self.assertEqual(wait_step_rstep, wait_step_wstep)
        self.assertRaises(TypeError, SetStep.fromLine, wss)
        self.assertRaises(TypeError, WaitUntilStep.fromLine, wss)

        wuss = self.wait_until_step_str
        wait_until_step_rstep = RecipeStep.fromLine(wuss)
        wait_until_step_wstep = WaitUntilStep.fromLine(wuss)

        self.assertEqual(wait_until_step_rstep, wait_until_step_wstep)
        self.assertRaises(TypeError, SetStep.fromLine, wuss)
        self.assertRaises(TypeError, WaitStep.fromLine, wuss)