コード例 #1
0
ファイル: test_llcp_tco.py プロジェクト: nfcpy/nfcpy
 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"
コード例 #2
0
 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"
コード例 #3
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"
コード例 #4
0
ファイル: test_llcp_tco.py プロジェクト: nfcpy/nfcpy
 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"
コード例 #5
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
コード例 #6
0
ファイル: test_llcp_tco.py プロジェクト: nfcpy/nfcpy
 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
コード例 #7
0
 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
コード例 #8
0
 def test_str(self, tco):
     assert str(tco) == "RAW None ->  ?"
     tco.bind(1)
     assert str(tco) == "RAW  1 ->  ?"
コード例 #9
0
 def tco(self):
     tco = nfc.llcp.tco.DataLinkConnection(128, 1)
     assert tco.state.CLOSED is True
     assert tco.bind(16) == 16
     return tco
コード例 #10
0
ファイル: test_llcp_tco.py プロジェクト: nfcpy/nfcpy
 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
コード例 #11
0
ファイル: test_llcp_tco.py プロジェクト: nfcpy/nfcpy
 def tco(self):
     tco = nfc.llcp.tco.DataLinkConnection(128, 1)
     assert tco.state.CLOSED is True
     assert tco.bind(16) == 16
     return tco
コード例 #12
0
ファイル: test_llcp_tco.py プロジェクト: nfcpy/nfcpy
 def test_str(self, tco):
     assert str(tco) == "RAW None ->  ?"
     tco.bind(1)
     assert str(tco) == "RAW  1 ->  ?"