def test_str(self): tco = nfc.llcp.tco.LogicalDataLink(128) assert str(tco) == "LDL None -> None" tco.bind(1) assert str(tco) == "LDL 1 -> None" tco.connect(1) assert str(tco) == "LDL 1 -> 1"
def test_str(self): tco = nfc.llcp.tco.LogicalDataLink(128) assert str(tco) == "LDL None -> None" tco.bind(1) assert str(tco) == "LDL 1 -> None" tco.connect(1) assert str(tco) == "LDL 1 -> 1"
def test_str(self): tco = nfc.llcp.tco.DataLinkConnection(128, 1) assert str(tco) == \ "DLC None <-> None CLOSED RW(R)=None " \ "V(S)=0 V(SA)=0 RW(L)=1 V(R)=0 V(RA)=0" tco.bind(1) assert str(tco) == \ "DLC 1 <-> None CLOSED RW(R)=None " \ "V(S)=0 V(SA)=0 RW(L)=1 V(R)=0 V(RA)=0"
def test_str(self): tco = nfc.llcp.tco.DataLinkConnection(128, 1) assert str(tco) == \ "DLC None <-> None CLOSED RW(R)=None " \ "V(S)=0 V(SA)=0 RW(L)=1 V(R)=0 V(RA)=0" tco.bind(1) assert str(tco) == \ "DLC 1 <-> None CLOSED RW(R)=None " \ "V(S)=0 V(SA)=0 RW(L)=1 V(R)=0 V(RA)=0"
def tco(self): tco = nfc.llcp.tco.LogicalDataLink(128) assert tco.state.ESTABLISHED is True assert tco.bind(1) == 1 yield tco tco.close() assert tco.state.SHUTDOWN is True
def tco(self): tco = nfc.llcp.tco.LogicalDataLink(128) assert tco.state.ESTABLISHED is True assert tco.bind(1) == 1 yield tco tco.close() assert tco.state.SHUTDOWN is True
def test_bind(self, tco): assert tco.bind(1) == 1 and tco.is_bound is True assert tco.bind(1) == 1 and tco.is_bound is True assert tco.bind(2) == 2 and tco.is_bound is True assert tco.bind(None) is None and tco.is_bound is False
def test_str(self, tco): assert str(tco) == "RAW None -> ?" tco.bind(1) assert str(tco) == "RAW 1 -> ?"
def tco(self): tco = nfc.llcp.tco.DataLinkConnection(128, 1) assert tco.state.CLOSED is True assert tco.bind(16) == 16 return tco
def test_bind(self, tco): assert tco.bind(1) == 1 and tco.is_bound is True assert tco.bind(1) == 1 and tco.is_bound is True assert tco.bind(2) == 2 and tco.is_bound is True assert tco.bind(None) is None and tco.is_bound is False
def tco(self): tco = nfc.llcp.tco.DataLinkConnection(128, 1) assert tco.state.CLOSED is True assert tco.bind(16) == 16 return tco
def test_str(self, tco): assert str(tco) == "RAW None -> ?" tco.bind(1) assert str(tco) == "RAW 1 -> ?"