def test_out_of_range(self):
     self.assert_initialize_driver()
     constraints = ParameterConstraints.dict()
     parameters = Parameter.dict()
     for key in constraints:
         _, minimum, maximum = constraints[key]
         self.assert_set_exception(parameters[key], minimum - 1)
         self.assert_set_exception(parameters[key], maximum + 1)
         self.assert_set_exception(parameters[key], 'expects int, not string!!')
 def test_out_of_range(self):
     self.assert_initialize_driver()
     constraints = ParameterConstraints.dict()
     parameters = Parameter.dict()
     for key in constraints:
         _, minimum, maximum = constraints[key]
         self.assert_set_exception(parameters[key], minimum - 1)
         self.assert_set_exception(parameters[key], maximum + 1)
         self.assert_set_exception(parameters[key], 'expects int, not string!!')
    def test_get_set_parameters(self):
        """
        verify that all parameters can be get set properly, this includes
        ensuring that read only parameters fail on set.
        """
        self.assert_enter_command_mode()

        # verify we can set read/write parameters
        constraints = ParameterConstraints.dict()
        parameters = Parameter.dict()
        for key in constraints:
            if self._driver_parameters[parameters[key]][self.READONLY]:
                continue
            _, _, maximum = constraints[key]
            self.assert_set_parameter(parameters[key], maximum)
    def test_get_set_parameters(self):
        """
        verify that all parameters can be get set properly, this includes
        ensuring that read only parameters fail on set.
        """
        self.assert_enter_command_mode()

        # verify we can set read/write parameters
        constraints = ParameterConstraints.dict()
        parameters = Parameter.dict()
        for key in constraints:
            if self._driver_parameters[parameters[key]][self.READONLY]:
                continue
            _, _, maximum = constraints[key]
            self.assert_set_parameter(parameters[key], maximum)