def data(self, value): """Set data value. Inputs are converted into target format. """ if self.data_type and value is not None: value = convert(self.data_type, value) DataHandler.data.fset(self, value)
def set_data(self, data): """Set data value. input data are converted into target format """ if self.data_type: data = convert(self.data_type, data) IOHandler.set_data(self, data)
def test_data_type(self): self.assertEqual(convert(self.simple_handler.data_type, '1'), 1)