cereal.messaging.tests package

Submodules

cereal.messaging.tests.test_fake module

class cereal.messaging.tests.test_fake.TestEvents(methodName='runTest')[source]

Bases: TestCase

test_mutation()[source]
test_wait()[source]
test_wait_multiprocess()[source]
test_wait_zero_timeout()[source]
class cereal.messaging.tests.test_fake.TestFakeSockets(methodName='runTest')[source]

Bases: TestCase

prefix: str | None = None
setUp()[source]

Hook method for setting up the test fixture before exercising it.

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

class cereal.messaging.tests.test_fake.TestFakeSockets_0(methodName='runTest')

Bases: TestFakeSockets

prefix: str | None = None
setUp()

Hook method for setting up the test fixture before exercising it.

tearDown()

Hook method for deconstructing the test fixture after testing it.

test_event_handle_init()
test_managed_socket_state()
test_non_managed_socket_state()
test_sockets_enable_disable()
test_synced_pub_sub()
class cereal.messaging.tests.test_fake.TestFakeSockets_1_test(methodName='runTest')

Bases: TestFakeSockets

prefix: str | None = 'test'
setUp()

Hook method for setting up the test fixture before exercising it.

tearDown()

Hook method for deconstructing the test fixture after testing it.

test_event_handle_init()
test_managed_socket_state()
test_non_managed_socket_state()
test_sockets_enable_disable()
test_synced_pub_sub()

cereal.messaging.tests.test_messaging module

class cereal.messaging.tests.test_messaging.TestMessaging(methodName='runTest')[source]

Bases: TestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_drain_sock = None
test_drain_sock_0()
test_drain_sock_1()
test_new_message = None
test_new_message_00_roadCameraState()
test_new_message_01_gpsNMEA()
test_new_message_02_can()
test_new_message_03_deviceState()
test_new_message_04_controlsState()
test_new_message_05_radarState()
test_new_message_06_roadEncodeIdx()
test_new_message_07_liveTracks()
test_new_message_08_sendcan()
test_new_message_09_logMessage()
test_new_message_10_liveCalibration()
test_new_message_11_androidLog()
test_new_message_12_gpsLocation()
test_new_message_13_carState()
test_new_message_14_carControl()
test_new_message_15_longitudinalPlan()
test_new_message_16_qcomGnss()
test_new_message_17_procLog()
test_new_message_18_ubloxGnss()
test_new_message_19_clocks()
test_new_message_20_ubloxRaw()
test_new_message_21_gpsLocationExternal()
test_new_message_22_testJoystick()
test_new_message_23_liveParameters()
test_new_message_24_cameraOdometry()
test_new_message_25_thumbnail()
test_new_message_26_onroadEvents()
test_new_message_27_carParams()
test_new_message_28_driverCameraState()
test_new_message_29_driverMonitoringState()
test_new_message_30_liveLocationKalman()
test_new_message_31_wideRoadCameraState()
test_new_message_32_modelV2()
test_new_message_33_driverEncodeIdx()
test_new_message_34_wideRoadEncodeIdx()
test_new_message_35_managerState()
test_new_message_36_uploaderState()
test_new_message_37_peripheralState()
test_new_message_38_pandaStates()
test_new_message_39_navInstruction()
test_new_message_40_navRoute()
test_new_message_41_navThumbnail()
test_new_message_42_errorLogMessage()
test_new_message_43_roadEncodeData()
test_new_message_44_driverEncodeData()
test_new_message_45_wideRoadEncodeData()
test_new_message_46_qRoadEncodeData()
test_new_message_47_qRoadEncodeIdx()
test_new_message_48_gnssMeasurements()
test_new_message_49_driverStateV2()
test_new_message_50_userFlag()
test_new_message_51_liveTorqueParameters()
test_new_message_52_magnetometer()
test_new_message_53_lightSensor()
test_new_message_54_temperatureSensor()
test_new_message_55_accelerometer()
test_new_message_56_gyroscope()
test_new_message_57_gyroscope2()
test_new_message_58_accelerometer2()
test_new_message_59_uiDebug()
test_new_message_60_microphone()
test_new_message_61_uiPlan()
test_new_message_62_livestreamRoadEncodeIdx()
test_new_message_63_livestreamWideRoadEncodeIdx()
test_new_message_64_livestreamDriverEncodeIdx()
test_new_message_65_livestreamRoadEncodeData()
test_new_message_66_livestreamWideRoadEncodeData()
test_new_message_67_livestreamDriverEncodeData()
test_new_message_68_temperatureSensor2()
test_new_message_69_customReservedRawData0()
test_new_message_70_customReservedRawData1()
test_new_message_71_customReservedRawData2()
test_new_message_72_carOutput()
test_pub_sock = None
test_pub_sock_00_roadCameraState()
test_pub_sock_01_gpsNMEA()
test_pub_sock_02_can()
test_pub_sock_03_deviceState()
test_pub_sock_04_controlsState()
test_pub_sock_05_radarState()
test_pub_sock_06_roadEncodeIdx()
test_pub_sock_07_liveTracks()
test_pub_sock_08_sendcan()
test_pub_sock_09_logMessage()
test_pub_sock_10_liveCalibration()
test_pub_sock_11_androidLog()
test_pub_sock_12_gpsLocation()
test_pub_sock_13_carState()
test_pub_sock_14_carControl()
test_pub_sock_15_longitudinalPlan()
test_pub_sock_16_qcomGnss()
test_pub_sock_17_procLog()
test_pub_sock_18_ubloxGnss()
test_pub_sock_19_clocks()
test_pub_sock_20_ubloxRaw()
test_pub_sock_21_gpsLocationExternal()
test_pub_sock_22_testJoystick()
test_pub_sock_23_liveParameters()
test_pub_sock_24_cameraOdometry()
test_pub_sock_25_thumbnail()
test_pub_sock_26_onroadEvents()
test_pub_sock_27_carParams()
test_pub_sock_28_driverCameraState()
test_pub_sock_29_driverMonitoringState()
test_pub_sock_30_liveLocationKalman()
test_pub_sock_31_wideRoadCameraState()
test_pub_sock_32_modelV2()
test_pub_sock_33_driverEncodeIdx()
test_pub_sock_34_wideRoadEncodeIdx()
test_pub_sock_35_managerState()
test_pub_sock_36_uploaderState()
test_pub_sock_37_peripheralState()
test_pub_sock_38_pandaStates()
test_pub_sock_39_navInstruction()
test_pub_sock_40_navRoute()
test_pub_sock_41_navThumbnail()
test_pub_sock_42_errorLogMessage()
test_pub_sock_43_roadEncodeData()
test_pub_sock_44_driverEncodeData()
test_pub_sock_45_wideRoadEncodeData()
test_pub_sock_46_qRoadEncodeData()
test_pub_sock_47_qRoadEncodeIdx()
test_pub_sock_48_gnssMeasurements()
test_pub_sock_49_driverStateV2()
test_pub_sock_50_userFlag()
test_pub_sock_51_liveTorqueParameters()
test_pub_sock_52_magnetometer()
test_pub_sock_53_lightSensor()
test_pub_sock_54_temperatureSensor()
test_pub_sock_55_accelerometer()
test_pub_sock_56_gyroscope()
test_pub_sock_57_gyroscope2()
test_pub_sock_58_accelerometer2()
test_pub_sock_59_uiDebug()
test_pub_sock_60_microphone()
test_pub_sock_61_uiPlan()
test_pub_sock_62_livestreamRoadEncodeIdx()
test_pub_sock_63_livestreamWideRoadEncodeIdx()
test_pub_sock_64_livestreamDriverEncodeIdx()
test_pub_sock_65_livestreamRoadEncodeData()
test_pub_sock_66_livestreamWideRoadEncodeData()
test_pub_sock_67_livestreamDriverEncodeData()
test_pub_sock_68_temperatureSensor2()
test_pub_sock_69_customReservedRawData0()
test_pub_sock_70_customReservedRawData1()
test_pub_sock_71_customReservedRawData2()
test_pub_sock_72_carOutput()
test_recv_one()[source]
test_recv_one_or_none()[source]
test_recv_one_retry()[source]
test_recv_sock()[source]
test_sub_sock = None
test_sub_sock_00_roadCameraState()
test_sub_sock_01_gpsNMEA()
test_sub_sock_02_can()
test_sub_sock_03_deviceState()
test_sub_sock_04_controlsState()
test_sub_sock_05_radarState()
test_sub_sock_06_roadEncodeIdx()
test_sub_sock_07_liveTracks()
test_sub_sock_08_sendcan()
test_sub_sock_09_logMessage()
test_sub_sock_10_liveCalibration()
test_sub_sock_11_androidLog()
test_sub_sock_12_gpsLocation()
test_sub_sock_13_carState()
test_sub_sock_14_carControl()
test_sub_sock_15_longitudinalPlan()
test_sub_sock_16_qcomGnss()
test_sub_sock_17_procLog()
test_sub_sock_18_ubloxGnss()
test_sub_sock_19_clocks()
test_sub_sock_20_ubloxRaw()
test_sub_sock_21_gpsLocationExternal()
test_sub_sock_22_testJoystick()
test_sub_sock_23_liveParameters()
test_sub_sock_24_cameraOdometry()
test_sub_sock_25_thumbnail()
test_sub_sock_26_onroadEvents()
test_sub_sock_27_carParams()
test_sub_sock_28_driverCameraState()
test_sub_sock_29_driverMonitoringState()
test_sub_sock_30_liveLocationKalman()
test_sub_sock_31_wideRoadCameraState()
test_sub_sock_32_modelV2()
test_sub_sock_33_driverEncodeIdx()
test_sub_sock_34_wideRoadEncodeIdx()
test_sub_sock_35_managerState()
test_sub_sock_36_uploaderState()
test_sub_sock_37_peripheralState()
test_sub_sock_38_pandaStates()
test_sub_sock_39_navInstruction()
test_sub_sock_40_navRoute()
test_sub_sock_41_navThumbnail()
test_sub_sock_42_errorLogMessage()
test_sub_sock_43_roadEncodeData()
test_sub_sock_44_driverEncodeData()
test_sub_sock_45_wideRoadEncodeData()
test_sub_sock_46_qRoadEncodeData()
test_sub_sock_47_qRoadEncodeIdx()
test_sub_sock_48_gnssMeasurements()
test_sub_sock_49_driverStateV2()
test_sub_sock_50_userFlag()
test_sub_sock_51_liveTorqueParameters()
test_sub_sock_52_magnetometer()
test_sub_sock_53_lightSensor()
test_sub_sock_54_temperatureSensor()
test_sub_sock_55_accelerometer()
test_sub_sock_56_gyroscope()
test_sub_sock_57_gyroscope2()
test_sub_sock_58_accelerometer2()
test_sub_sock_59_uiDebug()
test_sub_sock_60_microphone()
test_sub_sock_61_uiPlan()
test_sub_sock_62_livestreamRoadEncodeIdx()
test_sub_sock_63_livestreamWideRoadEncodeIdx()
test_sub_sock_64_livestreamDriverEncodeIdx()
test_sub_sock_65_livestreamRoadEncodeData()
test_sub_sock_66_livestreamWideRoadEncodeData()
test_sub_sock_67_livestreamDriverEncodeData()
test_sub_sock_68_temperatureSensor2()
test_sub_sock_69_customReservedRawData0()
test_sub_sock_70_customReservedRawData1()
test_sub_sock_71_customReservedRawData2()
test_sub_sock_72_carOutput()
class cereal.messaging.tests.test_messaging.TestPubSubSockets(methodName='runTest')[source]

Bases: TestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_conflate()[source]
test_pub_sub()[source]
test_receive_timeout()[source]
cereal.messaging.tests.test_messaging.assert_carstate(cs1, cs2)[source]
cereal.messaging.tests.test_messaging.delayed_send(delay, sock, dat)[source]
cereal.messaging.tests.test_messaging.random_bytes(length=1000)[source]
cereal.messaging.tests.test_messaging.random_carstate()[source]
cereal.messaging.tests.test_messaging.random_sock()[source]
cereal.messaging.tests.test_messaging.random_socks(num_socks=10)[source]
cereal.messaging.tests.test_messaging.zmq_expected_failure(func)[source]
cereal.messaging.tests.test_messaging.zmq_sleep(t=1)[source]

cereal.messaging.tests.test_poller module

class cereal.messaging.tests.test_poller.TestPoller(methodName='runTest')[source]

Bases: TestCase

test_conflate()[source]
test_multiple_messages()[source]
test_multiple_publishers_exception()[source]
test_poll_and_create_many_subscribers()[source]
test_poll_once()[source]
cereal.messaging.tests.test_poller.poller()[source]

cereal.messaging.tests.test_pub_sub_master module

class cereal.messaging.tests.test_pub_sub_master.TestPubMaster(methodName='runTest')[source]

Bases: TestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_init()[source]
test_send()[source]
class cereal.messaging.tests.test_pub_sub_master.TestSubMaster(methodName='runTest')[source]

Bases: TestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_alive()[source]
test_avg_frequency_checks()[source]
test_conflate()[source]
test_getitem()[source]
test_ignore_alive()[source]
test_init()[source]
test_init_state()[source]
test_update()[source]
test_update_timeout()[source]
test_valid()[source]

cereal.messaging.tests.test_services module

class cereal.messaging.tests.test_services.TestServices(methodName='runTest')[source]

Bases: TestCase

test_generated_header()[source]
test_no_duplicate_port()[source]
test_services = None
test_services_00_gyroscope()
test_services_01_gyroscope2()
test_services_02_accelerometer()
test_services_03_accelerometer2()
test_services_04_magnetometer()
test_services_05_lightSensor()
test_services_06_temperatureSensor()
test_services_07_temperatureSensor2()
test_services_08_gpsNMEA()
test_services_09_deviceState()
test_services_10_can()
test_services_11_controlsState()
test_services_12_pandaStates()
test_services_13_peripheralState()
test_services_14_radarState()
test_services_15_roadEncodeIdx()
test_services_16_liveTracks()
test_services_17_sendcan()
test_services_18_logMessage()
test_services_19_errorLogMessage()
test_services_20_liveCalibration()
test_services_21_liveTorqueParameters()
test_services_22_androidLog()
test_services_23_carState()
test_services_24_carControl()
test_services_25_carOutput()
test_services_26_longitudinalPlan()
test_services_27_procLog()
test_services_28_gpsLocationExternal()
test_services_29_gpsLocation()
test_services_30_ubloxGnss()
test_services_31_qcomGnss()
test_services_32_gnssMeasurements()
test_services_33_clocks()
test_services_34_ubloxRaw()
test_services_35_liveLocationKalman()
test_services_36_liveParameters()
test_services_37_cameraOdometry()
test_services_38_thumbnail()
test_services_39_onroadEvents()
test_services_40_carParams()
test_services_41_roadCameraState()
test_services_42_driverCameraState()
test_services_43_driverEncodeIdx()
test_services_44_driverStateV2()
test_services_45_driverMonitoringState()
test_services_46_wideRoadEncodeIdx()
test_services_47_wideRoadCameraState()
test_services_48_modelV2()
test_services_49_managerState()
test_services_50_uploaderState()
test_services_51_navInstruction()
test_services_52_navRoute()
test_services_53_navThumbnail()
test_services_54_uiPlan()
test_services_55_qRoadEncodeIdx()
test_services_56_userFlag()
test_services_57_microphone()
test_services_58_uiDebug()
test_services_59_testJoystick()
test_services_60_roadEncodeData()
test_services_61_driverEncodeData()
test_services_62_wideRoadEncodeData()
test_services_63_qRoadEncodeData()
test_services_64_livestreamWideRoadEncodeIdx()
test_services_65_livestreamRoadEncodeIdx()
test_services_66_livestreamDriverEncodeIdx()
test_services_67_livestreamWideRoadEncodeData()
test_services_68_livestreamRoadEncodeData()
test_services_69_livestreamDriverEncodeData()
test_services_70_customReservedRawData0()
test_services_71_customReservedRawData1()
test_services_72_customReservedRawData2()

Module contents