示例#1
0
def test_payload_assignment_error():
    with pytest.raises(AttributeError):
        hc = ccp.HostCommand(code=ccp.CommandCode.connect)
        hc.payload = 0
示例#2
0
def test_message_length_error():
    with pytest.raises(ccp.MessageLengthError):
        ccp.HostCommand(code=ccp.CommandCode.connect, dlc=5)
示例#3
0
def test_identifier_type_error():
    with pytest.raises(ccp.IdentifierTypeError):
        ccp.HostCommand(code=ccp.CommandCode.connect, extended_id=False)