22 sys.path.insert(1,
"../")
26 from DataPortStatus
import *
35 self.assertEqual(self.
_dps.
toString(DataPortStatus.PORT_OK),
"PORT_OK")
36 self.assertEqual(self.
_dps.
toString(DataPortStatus.PORT_ERROR),
"PORT_ERROR")
37 self.assertEqual(self.
_dps.
toString(DataPortStatus.BUFFER_FULL),
"BUFFER_FULL")
38 self.assertEqual(self.
_dps.
toString(DataPortStatus.BUFFER_EMPTY),
"BUFFER_EMPTY")
39 self.assertEqual(self.
_dps.
toString(DataPortStatus.BUFFER_TIMEOUT),
"BUFFER_TIMEOUT")
40 self.assertEqual(self.
_dps.
toString(DataPortStatus.SEND_FULL),
"SEND_FULL")
41 self.assertEqual(self.
_dps.
toString(DataPortStatus.SEND_TIMEOUT),
"SEND_TIMEOUT")
42 self.assertEqual(self.
_dps.
toString(DataPortStatus.RECV_EMPTY),
"RECV_EMPTY")
43 self.assertEqual(self.
_dps.
toString(DataPortStatus.RECV_TIMEOUT),
"RECV_TIMEOUT")
44 self.assertEqual(self.
_dps.
toString(DataPortStatus.INVALID_ARGS),
"INVALID_ARGS")
45 self.assertEqual(self.
_dps.
toString(DataPortStatus.PRECONDITION_NOT_MET),
"PRECONDITION_NOT_MET")
46 self.assertEqual(self.
_dps.
toString(DataPortStatus.CONNECTION_LOST),
"CONNECTION_LOST")
47 self.assertEqual(self.
_dps.
toString(DataPortStatus.UNKNOWN_ERROR),
"UNKNOWN_ERROR")
51 if __name__ ==
'__main__':
def toString(nv, name=None)
Get string value in NVList specified by name.