Ejemplo n.º 1
0
 def Test_mtsInt(self):
     """Test mtsInt"""
     variable = cisstMultiTaskPython.mtsInt(4)
     # check type
     self.failUnless(isinstance(variable, cisstMultiTaskPython.mtsInt))
     self.failUnless(isinstance(variable, cisstMultiTaskPython.mtsGenericObject))
     self.failUnless(isinstance(variable, cisstCommonPython.cmnGenericObject))
     # check default value and modify
     self.failUnless(variable.Data == 4)
     variable.Data = 8
     self.failUnless(variable.Data == 8)
 def Test_mtsInt(self):
     """Test mtsInt"""
     variable = cisstMultiTaskPython.mtsInt(4)
     # check type
     self.failUnless(isinstance(variable, cisstMultiTaskPython.mtsInt))
     self.failUnless(
         isinstance(variable, cisstMultiTaskPython.mtsGenericObject))
     self.failUnless(
         isinstance(variable, cisstCommonPython.cmnGenericObject))
     # check default value and modify
     self.failUnless(variable.Data == 4)
     variable.Data = 8
     self.failUnless(variable.Data == 8)
Ejemplo n.º 3
0
 def Test_mtsGenericObject(self):
     """Test mtsGenericObject methods"""
     variable = cisstMultiTaskPython.mtsInt(4)
     # check type
     self.failUnless(isinstance(variable, cisstMultiTaskPython.mtsInt))
     self.failUnless(isinstance(variable, cisstMultiTaskPython.mtsGenericObject))
     # check default timestamp and modify
     timestamp = variable.GetTimestamp()
     self.failUnless(timestamp == 0.0)
     variable.SetTimestamp(10.0)
     timestamp = variable.GetTimestamp()
     self.failUnless(timestamp == 10.0)
     # check default valid flag and modify
     valid = variable.GetValid()
     self.failUnless(valid == True)
     variable.SetValid(False)
     valid = variable.GetValid()
     self.failUnless(valid == False)
 def Test_mtsGenericObject(self):
     """Test mtsGenericObject methods"""
     variable = cisstMultiTaskPython.mtsInt(4)
     # check type
     self.failUnless(isinstance(variable, cisstMultiTaskPython.mtsInt))
     self.failUnless(
         isinstance(variable, cisstMultiTaskPython.mtsGenericObject))
     # check default timestamp and modify
     timestamp = variable.GetTimestamp()
     self.failUnless(timestamp == 0.0)
     variable.SetTimestamp(10.0)
     timestamp = variable.GetTimestamp()
     self.failUnless(timestamp == 10.0)
     # check default valid flag and modify
     valid = variable.GetValid()
     self.failUnless(valid == True)
     variable.SetValid(False)
     valid = variable.GetValid()
     self.failUnless(valid == False)