예제 #1
0
    def test_init(self):
        """TODO strictly one-line summary

        TODO Detailed multi-line description if
        necessary.

        Args:
            arg1 (type1): TODO describe arg, valid values, etc.
            arg2 (type2): TODO describe arg, valid values, etc.
            arg3 (type3): TODO describe arg, valid values, etc.
        Returns:
            TODO describe the return type and details
        Raises:
            TodoError1: if TODO.
            TodoError2: if TODO.

        """

        name = 'four'
        config = Mock()
        config.OutputPin = 'e'
        target = Led(name, config)
        self.assertEqual(name, target.Name)
        self.assertEqual(0.5, target.FlashingOnDuration_s)
        self.assertEqual(0.5, target.FlashingOffDuration_s)
예제 #2
0
    def setUp(self):
        """TODO strictly one-line summary

        TODO Detailed multi-line description if
        necessary.

        Args:
            arg1 (type1): TODO describe arg, valid values, etc.
            arg2 (type2): TODO describe arg, valid values, etc.
            arg3 (type3): TODO describe arg, valid values, etc.
        Returns:
            TODO describe the return type and details
        Raises:
            TodoError1: if TODO.
            TodoError2: if TODO.

        """

        config = Mock()
        config.OutputPin = 'e'
        self.Target = Led('three', config)
예제 #3
0
    def setUp(self):
        """TODO strictly one-line summary

        TODO Detailed multi-line description if
        necessary.

        Args:
            arg1 (type1): TODO describe arg, valid values, etc.
            arg2 (type2): TODO describe arg, valid values, etc.
            arg3 (type3): TODO describe arg, valid values, etc.
        Returns:
            TODO describe the return type and details
        Raises:
            TodoError1: if TODO.
            TodoError2: if TODO.

        """

        config = Mock()
        config.OutputPin = 'e'
        self.Target = Led('three', config)
예제 #4
0
class LedTestCase(unittest.TestCase):
    """
    TODO class comment
    """

    # --------------------------------------------------------------------------
    def setUp(self):
        """TODO strictly one-line summary

        TODO Detailed multi-line description if
        necessary.

        Args:
            arg1 (type1): TODO describe arg, valid values, etc.
            arg2 (type2): TODO describe arg, valid values, etc.
            arg3 (type3): TODO describe arg, valid values, etc.
        Returns:
            TODO describe the return type and details
        Raises:
            TodoError1: if TODO.
            TodoError2: if TODO.

        """

        config = Mock()
        config.OutputPin = 'e'
        self.Target = Led('three', config)


    # --------------------------------------------------------------------------
    def test_init(self):
        """TODO strictly one-line summary

        TODO Detailed multi-line description if
        necessary.

        Args:
            arg1 (type1): TODO describe arg, valid values, etc.
            arg2 (type2): TODO describe arg, valid values, etc.
            arg3 (type3): TODO describe arg, valid values, etc.
        Returns:
            TODO describe the return type and details
        Raises:
            TodoError1: if TODO.
            TodoError2: if TODO.

        """

        name = 'four'
        config = Mock()
        config.OutputPin = 'e'
        target = Led(name, config)
        self.assertEqual(name, target.Name)
        self.assertEqual(0.5, target.FlashingOnDuration_s)
        self.assertEqual(0.5, target.FlashingOffDuration_s)


    # --------------------------------------------------------------------------
    def test_turnOn(self):
        """TODO strictly one-line summary

        TODO Detailed multi-line description if
        necessary.

        Args:
            arg1 (type1): TODO describe arg, valid values, etc.
            arg2 (type2): TODO describe arg, valid values, etc.
            arg3 (type3): TODO describe arg, valid values, etc.
        Returns:
            TODO describe the return type and details
        Raises:
            TodoError1: if TODO.
            TodoError2: if TODO.

        """

        # TODO
        #output = pibrella.output.e
        #self.assertEqual(0, output.read())
        self.Target.turnOn()
        #self.assertEqual(1, output.read())


    # --------------------------------------------------------------------------
    def test_turnOff(self):
        """TODO strictly one-line summary

        TODO Detailed multi-line description if
        necessary.

        Args:
            arg1 (type1): TODO describe arg, valid values, etc.
            arg2 (type2): TODO describe arg, valid values, etc.
            arg3 (type3): TODO describe arg, valid values, etc.
        Returns:
            TODO describe the return type and details
        Raises:
            TodoError1: if TODO.
            TodoError2: if TODO.

        """

        # TODO
        #output = pibrella.output.f
        #self.assertEqual(0, output.read())
        self.Target.turnOff()
        #self.assertEqual(1, output.read())


    # --------------------------------------------------------------------------
    def test_setFlashing(self):
        """TODO strictly one-line summary

        TODO Detailed multi-line description if
        necessary.

        Args:
            arg1 (type1): TODO describe arg, valid values, etc.
            arg2 (type2): TODO describe arg, valid values, etc.
            arg3 (type3): TODO describe arg, valid values, etc.
        Returns:
            TODO describe the return type and details
        Raises:
            TodoError1: if TODO.
            TodoError2: if TODO.

        """

        # TODO
        self.Target.setFlashing()
예제 #5
0
class LedTestCase(unittest.TestCase):
    """
    TODO class comment
    """

    # --------------------------------------------------------------------------
    def setUp(self):
        """TODO strictly one-line summary

        TODO Detailed multi-line description if
        necessary.

        Args:
            arg1 (type1): TODO describe arg, valid values, etc.
            arg2 (type2): TODO describe arg, valid values, etc.
            arg3 (type3): TODO describe arg, valid values, etc.
        Returns:
            TODO describe the return type and details
        Raises:
            TodoError1: if TODO.
            TodoError2: if TODO.

        """

        config = Mock()
        config.OutputPin = 'e'
        self.Target = Led('three', config)

    # --------------------------------------------------------------------------
    def test_init(self):
        """TODO strictly one-line summary

        TODO Detailed multi-line description if
        necessary.

        Args:
            arg1 (type1): TODO describe arg, valid values, etc.
            arg2 (type2): TODO describe arg, valid values, etc.
            arg3 (type3): TODO describe arg, valid values, etc.
        Returns:
            TODO describe the return type and details
        Raises:
            TodoError1: if TODO.
            TodoError2: if TODO.

        """

        name = 'four'
        config = Mock()
        config.OutputPin = 'e'
        target = Led(name, config)
        self.assertEqual(name, target.Name)
        self.assertEqual(0.5, target.FlashingOnDuration_s)
        self.assertEqual(0.5, target.FlashingOffDuration_s)

    # --------------------------------------------------------------------------
    def test_turnOn(self):
        """TODO strictly one-line summary

        TODO Detailed multi-line description if
        necessary.

        Args:
            arg1 (type1): TODO describe arg, valid values, etc.
            arg2 (type2): TODO describe arg, valid values, etc.
            arg3 (type3): TODO describe arg, valid values, etc.
        Returns:
            TODO describe the return type and details
        Raises:
            TodoError1: if TODO.
            TodoError2: if TODO.

        """

        # TODO
        #output = pibrella.output.e
        #self.assertEqual(0, output.read())
        self.Target.turnOn()
        #self.assertEqual(1, output.read())

    # --------------------------------------------------------------------------
    def test_turnOff(self):
        """TODO strictly one-line summary

        TODO Detailed multi-line description if
        necessary.

        Args:
            arg1 (type1): TODO describe arg, valid values, etc.
            arg2 (type2): TODO describe arg, valid values, etc.
            arg3 (type3): TODO describe arg, valid values, etc.
        Returns:
            TODO describe the return type and details
        Raises:
            TodoError1: if TODO.
            TodoError2: if TODO.

        """

        # TODO
        #output = pibrella.output.f
        #self.assertEqual(0, output.read())
        self.Target.turnOff()
        #self.assertEqual(1, output.read())

    # --------------------------------------------------------------------------
    def test_setFlashing(self):
        """TODO strictly one-line summary

        TODO Detailed multi-line description if
        necessary.

        Args:
            arg1 (type1): TODO describe arg, valid values, etc.
            arg2 (type2): TODO describe arg, valid values, etc.
            arg3 (type3): TODO describe arg, valid values, etc.
        Returns:
            TODO describe the return type and details
        Raises:
            TodoError1: if TODO.
            TodoError2: if TODO.

        """

        # TODO
        self.Target.setFlashing()