def test_poll(self, llc, ldl):
with pytest.raises(nfc.llcp.Error) as excinfo:
llc.poll(object(), 'recv')
assert excinfo.value.errno == errno.ENOTSOCK
with pytest.raises(nfc.llcp.Error) as excinfo:
llc.poll(ldl, 'recv')
assert excinfo.value.errno == errno.EBADF
llc.bind(ldl)
pdu = nfc.llcp.pdu.UnnumberedInformation(32, 17, b'123')
threading.Timer(0.01, llc.dispatch, (pdu,)).start()
assert llc.poll(ldl, 'recv') is True
评论列表
文章目录