コード例 #1
0
    def test(self):
        task = core.Task()
        current = stages.CurrentState("current")
        self.assertEqual(current.name, "current")
        current.timeout = 1.23
        self.assertEqual(current.timeout, 1.23)

        task.add(current)

        # ownership of current was passed to task
        with self.assertRaises(TypeError):
            current.name

        task.add(stages.Connect("connect", []))
        task.add(stages.FixedState())
コード例 #2
0
 def test_FixedState(self):
     stage = stages.FixedState("fixed")