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