repo_id
stringclasses
409 values
prefix
large_stringlengths
34
36.3k
target
large_stringlengths
1
498
assertion_type
stringclasses
31 values
difficulty
stringclasses
8 values
test_file
stringlengths
10
121
test_function
stringlengths
1
104
test_class
stringlengths
0
51
lineno
int32
2
11.3k
commit_idx
int32
commaai/opendbc
import unittest from opendbc.car.volkswagen.values import VolkswagenSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety MSG_LENKHILFE_3 = 0x0D0 # RX from...
self._tx(self._button_msg(_set=True)))
self.assertFalse
func_call
opendbc/safety/tests/test_volkswagen_pq.py
test_spam_cancel_safety_check
TestVolkswagenPqStockSafety
127
null
commaai/opendbc
import unittest from opendbc.car.volkswagen.values import VolkswagenSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety MSG_LENKHILFE_3 = 0x0D0 # RX from...
self._tx(self._button_msg(resume=True)))
self.assertFalse
func_call
opendbc/safety/tests/test_volkswagen_pq.py
test_spam_cancel_safety_check
TestVolkswagenPqStockSafety
126
null
commaai/opendbc
import random import unittest from opendbc.car.hyundai.values import HyundaiSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety from opendbc.safety.tests.hyunda...
self._tx(self._accel_msg(0, aeb_req=True)))
self.assertFalse
func_call
opendbc/safety/tests/test_hyundai.py
test_no_aeb_scc12
TestHyundaiLongitudinalSafety
237
null
commaai/opendbc
from opendbc.car.values import PLATFORMS class TestPlatformConfigs: def test_configs(self, subtests): for name, platform in PLATFORMS.items(): with subtests.test(platform=str(platform)): assert platform.config._frozen if platform != "MOCK": assert len(platform.config.dbc_dict) >...
0
assert
numeric_literal
opendbc/car/tests/test_platform_configs.py
test_configs
TestPlatformConfigs
13
null
commaai/opendbc
import numpy as np import random import unittest import itertools from opendbc.car.toyota.values import ToyotaSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafet...
self._rx(msg))
self.assertTrue
func_call
opendbc/safety/tests/test_toyota.py
test_rx_hook
TestToyotaSafetyBase
117
null
commaai/opendbc
from hypothesis import settings, given, strategies as st import pytest from opendbc.car import gen_empty_fingerprint from opendbc.car.structs import CarParams from opendbc.car.fw_versions import build_fw_dict from opendbc.car.hyundai.interface import CarInterface from opendbc.car.hyundai.hyundaicanfd import CanBus fr...
[e[0] for e in ecus]
assert
collection
opendbc/car/hyundai/tests/test_hyundai.py
test_platform_code_ecus_available
TestHyundaiFingerprint
160
null
commaai/opendbc
import unittest from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety MSG_LH_EPS_03 = 0x9F # RX from EPS, for driver steering torque MSG_ESP_03 = 0x103 # RX from ABS,...
self._tx(self._ls_01_msg(cancel=1)))
self.assertTrue
func_call
opendbc/safety/tests/test_volkswagen_mlb.py
test_spam_cancel_safety_check
TestVolkswagenMlbStockSafety
125
null
commaai/opendbc
import pytest import random from opendbc.can import CANPacker, CANParser from opendbc.can.tests import TEST_DBC MAX_BAD_COUNTER = 5 class TestCanParserPacker: def test_subaru(self): # Subaru is little endian dbc_file = "subaru_global_2017_generated" msgs = [("ES_LKAS", 50)] parser = CANParser(d...
steer)
pytest.approx
variable
opendbc/can/tests/test_packer_parser.py
test_subaru
TestCanParserPacker
214
null
commaai/opendbc
import random import unittest from opendbc.car.hyundai.values import HyundaiSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety from opendbc.safety.tests.hyunda...
self._tx(self._fca11_msg()))
self.assertTrue
func_call
opendbc/safety/tests/test_hyundai.py
test_no_aeb_fca11
TestHyundaiLongitudinalSafety
230
null
commaai/opendbc
import pytest import random from opendbc.can import CANPacker, CANParser from opendbc.can.tests import TEST_DBC MAX_BAD_COUNTER = 5 class TestCanParserPacker: def test_parser_no_partial_update(self): """ Ensure that the CANParser doesn't partially update messages with invalid signals (COUNTER/CHECKSUM). ...
[]
assert
collection
opendbc/can/tests/test_packer_parser.py
test_parser_no_partial_update
TestCanParserPacker
134
null
commaai/opendbc
import re from opendbc.car.honda.fingerprints import FW_VERSIONS from opendbc.car.honda.values import HONDA_BOSCH, HONDA_BOSCH_TJA_CONTROL HONDA_FW_VERSION_RE = br"[A-Z0-9]{5}-[A-Z0-9]{3}(-|,)[A-Z0-9]{4}(\x00){2}$" class TestHondaFingerprint: def test_fw_version_format(self): # Asserts all FW versions follow a...
None
assert
none_literal
opendbc/car/honda/tests/test_honda.py
test_fw_version_format
TestHondaFingerprint
15
null
commaai/opendbc
from hypothesis import given, settings, strategies as st from opendbc.car import Bus from opendbc.car.structs import CarParams from opendbc.car.fw_versions import build_fw_dict from opendbc.car.toyota.fingerprints import FW_VERSIONS from opendbc.car.toyota.values import CAR, DBC, TSS2_CAR, ANGLE_CONTROL_CAR, RADAR_ACC...
platform
assert
variable
opendbc/car/toyota/tests/test_toyota.py
test_fuzzy_excluded_platforms
TestToyotaFingerprint
163
null
commaai/opendbc
import pytest import random import time from collections import defaultdict from opendbc.car.can_definitions import CanData from opendbc.car.car_helpers import interfaces from opendbc.car.structs import CarParams from opendbc.car.fingerprints import FW_VERSIONS from opendbc.car.fw_versions import FW_QUERY_CONFIGS, FUZ...
brand_matches
assert
variable
opendbc/car/tests/test_fw_fingerprint.py
test_custom_fuzzy_match
TestFwFingerprint
71
null
commaai/opendbc
import numpy as np import random import unittest import itertools from opendbc.car.toyota.values import ToyotaSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafet...
self._tx(tester_present))
self.assertEqual
func_call
opendbc/safety/tests/test_toyota.py
test_diagnostics
TestToyotaSafetyBase
84
null
commaai/opendbc
import pytest import random import time from collections import defaultdict from opendbc.car.can_definitions import CanData from opendbc.car.car_helpers import interfaces from opendbc.car.structs import CarParams from opendbc.car.fingerprints import FW_VERSIONS from opendbc.car.fw_versions import FW_QUERY_CONFIGS, FUZ...
ref_time + self.TOL
assert
complex_expr
opendbc/car/tests/test_fw_fingerprint.py
_assert_timing
TestFwFingerprintTiming
233
null
commaai/opendbc
from parameterized import parameterized from opendbc.car.gm.fingerprints import FINGERPRINTS from opendbc.car.gm.values import CAMERA_ACC_CAR, GM_RX_OFFSET CAMERA_DIAGNOSTIC_ADDRESS = 0x24b class TestGMFingerprint: @parameterized.expand(FINGERPRINTS.items()) def test_can_fingerprints(self, car_model, fingerprint...
0
assert
numeric_literal
opendbc/car/gm/tests/test_gm.py
test_can_fingerprints
TestGMFingerprint
12
null
commaai/opendbc
import unittest from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety class TestMazdaSafety(common.CarSafetyTest, common.DriverTorqueSteeringSafetyTest): TX_MSGS = [[0x24...
self._tx(self._button_msg(cancel=True)))
self.assertTrue
func_call
opendbc/safety/tests/test_mazda.py
test_buttons
TestMazdaSafety
75
null
commaai/opendbc
import unittest import numpy as np from opendbc.car.honda.values import HondaSafetyFlags from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.car.structs import CarParams from opendbc.safety.tests.common import CANPackerSafety, MAX_WRONG_COUNTERS HONDA_N_CO...
self.safety.get_controls_allowed())
self.assertTrue
func_call
opendbc/safety/tests/test_honda.py
test_disengage_on_main
HondaButtonEnableBase
85
null
commaai/opendbc
import pytest import random from opendbc.can import CANPacker, CANParser from opendbc.can.tests import TEST_DBC MAX_BAD_COUNTER = 5 class TestCanParserPacker: def test_packer_parser(self): msgs = [ ("Brake_Status", 0), ("CAN_FD_MESSAGE", 0), ("STEERING_CONTROL", 0), ] packer = CANPac...
val)
pytest.approx
variable
opendbc/can/tests/test_packer_parser.py
test_packer_parser
TestCanParserPacker
172
null
commaai/opendbc
from opendbc.car import gen_empty_fingerprint from opendbc.car.tesla.interface import CarInterface from opendbc.car.tesla.radar_interface import RADAR_START_ADDR from opendbc.car.tesla.values import CAR class TestTeslaFingerprint: def test_radar_detection(self): # Test radar availability detection for cars with ...
radar
assert
variable
opendbc/car/tesla/tests/test_tesla.py
test_radar_detection
TestTeslaFingerprint
15
null
commaai/opendbc
import unittest import numpy as np from opendbc.car.honda.values import HondaSafetyFlags from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.car.structs import CarParams from opendbc.safety.tests.common import CANPackerSafety, MAX_WRONG_COUNTERS HONDA_N_CO...
self._tx(not_tester_present))
self.assertFalse
func_call
opendbc/safety/tests/test_honda.py
test_diagnostics
TestHondaBoschLongSafety
483
null
commaai/opendbc
import numpy as np import random import unittest import itertools from opendbc.car.toyota.values import ToyotaSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafet...
f"{req=} {req2=} {angle=}")
self.assertEqual
string_literal
opendbc/safety/tests/test_toyota.py
test_lta_2_steer_cmd
TestToyotaSecOcSafetyBase
349
null
commaai/opendbc
import numpy as np import random import unittest import itertools from opendbc.car.toyota.values import ToyotaSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafet...
self._tx(self._lta_msg(0, 0, angle, 0)))
self.assertTrue
func_call
opendbc/safety/tests/test_toyota.py
test_lta_steer_cmd
TestToyotaSafetyAngle
197
null
commaai/opendbc
import numpy as np import random import unittest import itertools from opendbc.car.toyota.values import ToyotaSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafet...
-final_angle)
self.assertEqual
complex_expr
opendbc/safety/tests/test_toyota.py
test_angle_measurements
TestToyotaSafetyAngle
240
null
commaai/opendbc
import pytest import math import numpy as np from opendbc.car.honda.interface import CarInterface from opendbc.car.honda.values import CAR from opendbc.car.vehicle_model import VehicleModel, dyn_ss_sol, create_dyn_state_matrices class TestVehicleModel: def setup_method(self): CP = CarInterface.get_non_essentia...
pytest.approx(yr2)
assert
func_call
opendbc/car/tests/test_vehicle_model.py
test_dyn_ss_sol_against_yaw_rate
TestVehicleModel
39
null
commaai/opendbc
import pytest import random from opendbc.can import CANPacker, CANParser from opendbc.can.tests import TEST_DBC MAX_BAD_COUNTER = 5 class TestCanParserPacker: def test_parser_updated_list(self): msgs = [("CAN_FD_MESSAGE", 10), ] parser = CANParser(TEST_DBC, msgs, 0) packer = CANPacker(TEST_DBC) m...
{245}
assert
collection
opendbc/can/tests/test_packer_parser.py
test_parser_updated_list
TestCanParserPacker
77
null
commaai/opendbc
import unittest import numpy as np from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety from opendbc.car.volkswagen.values import VolkswagenSafetyFlags MAX_ACCEL = 2.0 MIN_A...
self._tx(self._gra_acc_01_msg(resume=1)))
self.assertFalse
func_call
opendbc/safety/tests/test_volkswagen_mqb.py
test_spam_cancel_safety_check
TestVolkswagenMqbStockSafety
143
null
commaai/opendbc
import enum import unittest from opendbc.car.subaru.values import SubaruSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety from functools import partial def l...
should_tx)
self.assertEqual
variable
opendbc/safety/tests/test_subaru.py
test_es_uds_message
TestSubaruGen2LongitudinalSafety
228
null
commaai/opendbc
import unittest import numpy as np from opendbc.car.honda.values import HondaSafetyFlags from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.car.structs import CarParams from opendbc.safety.tests.common import CANPackerSafety, MAX_WRONG_COUNTERS HONDA_N_CO...
self._rx(self._user_gas_msg(0)))
self.assertFalse
func_call
opendbc/safety/tests/test_honda.py
test_rx_hook
HondaButtonEnableBase
124
null
commaai/opendbc
import pytest from opendbc.car.values import PLATFORMS from opendbc.car.tests.routes import non_tested_cars, routes @pytest.mark.parametrize("platform", PLATFORMS.keys()) def test_test_route_present(platform): tested_platforms = [r.car_model for r in routes] assert platform in
set(tested_platforms) | set(non_tested_cars)
assert
func_call
opendbc/car/tests/test_routes.py
test_test_route_present
10
null
commaai/opendbc
import unittest import numpy as np from opendbc.car.honda.values import HondaSafetyFlags from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.car.structs import CarParams from opendbc.safety.tests.common import CANPackerSafety, MAX_WRONG_COUNTERS HONDA_N_CO...
self._tx(tester_present))
self.assertTrue
func_call
opendbc/safety/tests/test_honda.py
test_diagnostics
TestHondaBoschLongSafety
480
null
commaai/opendbc
import unittest from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety MSG_LH_EPS_03 = 0x9F # RX from EPS, for driver steering torque MSG_ESP_03 = 0x103 # RX from ABS,...
self.safety.get_torque_driver_min())
self.assertEqual
func_call
opendbc/safety/tests/test_volkswagen_mlb.py
test_torque_measurements
TestVolkswagenMlbSafetyBase
100
null
commaai/opendbc
import random from collections.abc import Iterable from hypothesis import settings, given, strategies as st from parameterized import parameterized from opendbc.car.structs import CarParams from opendbc.car.fw_versions import build_fw_dict from opendbc.car.ford.values import CAR, FW_QUERY_CONFIG, FW_PATTERN, get_plat...
0
assert
numeric_literal
opendbc/car/ford/tests/test_ford.py
test_match_fw_fuzzy
TestFordFW
142
null
commaai/opendbc
import pytest import random import time from collections import defaultdict from opendbc.car.can_definitions import CanData from opendbc.car.car_helpers import interfaces from opendbc.car.structs import CarParams from opendbc.car.fingerprints import FW_VERSIONS from opendbc.car.fw_versions import FW_QUERY_CONFIGS, FUZ...
ref_time - self.TOL
assert
complex_expr
opendbc/car/tests/test_fw_fingerprint.py
_assert_timing
TestFwFingerprintTiming
234
null
commaai/opendbc
import unittest import numpy as np from opendbc.car.honda.values import HondaSafetyFlags from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.car.structs import CarParams from opendbc.safety.tests.common import CANPackerSafety, MAX_WRONG_COUNTERS HONDA_N_CO...
self._rx(self._speed_msg(0)))
self.assertFalse
func_call
opendbc/safety/tests/test_honda.py
test_rx_hook
HondaButtonEnableBase
123
null
commaai/opendbc
import unittest import numpy as np from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety from opendbc.car.volkswagen.values import VolkswagenSafetyFlags MAX_ACCEL = 2.0 MIN_A...
self.safety.get_torque_driver_max())
self.assertEqual
func_call
opendbc/safety/tests/test_volkswagen_mqb.py
test_torque_measurements
TestVolkswagenMqbSafetyBase
119
null
commaai/opendbc
import unittest from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety MSG_LH_EPS_03 = 0x9F # RX from EPS, for driver steering torque MSG_ESP_03 = 0x103 # RX from ABS,...
self.safety.get_torque_driver_max())
self.assertEqual
func_call
opendbc/safety/tests/test_volkswagen_mlb.py
test_torque_measurements
TestVolkswagenMlbSafetyBase
101
null
commaai/opendbc
import pytest import random import time from collections import defaultdict from opendbc.car.can_definitions import CanData from opendbc.car.car_helpers import interfaces from opendbc.car.structs import CarParams from opendbc.car.fingerprints import FW_VERSIONS from opendbc.car.fw_versions import FW_QUERY_CONFIGS, FUZ...
Ecu.transmission
assert
complex_expr
opendbc/car/tests/test_fw_fingerprint.py
test_blacklisted_ecus
TestFwFingerprint
138
null
commaai/opendbc
import numpy as np import random import unittest import opendbc.safety.tests.common as common from opendbc.car.ford.carcontroller import MAX_LATERAL_ACCEL from opendbc.car.ford.values import FordSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py from opendbc.s...
self._tx(self._lkas_command_msg(1)))
self.assertFalse
func_call
opendbc/safety/tests/test_ford.py
test_prevent_lkas_action
TestFordSafetyBase
359
null
commaai/opendbc
from collections import defaultdict import pytest from opendbc.car.car_helpers import interfaces from opendbc.car.docs import get_all_car_docs from opendbc.car.docs_definitions import Cable, Column, PartType, Star, SupportType from opendbc.car.honda.values import CAR as HONDA from opendbc.car.values import PLATFORMS ...
Star.EMPTY
assert
complex_expr
opendbc/car/tests/test_docs.py
test_torque_star
TestCarDocs
56
null
commaai/opendbc
import unittest from opendbc.car.volkswagen.values import VolkswagenSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety MSG_LENKHILFE_3 = 0x0D0 # RX from...
self._tx(self._button_msg(cancel=True)))
self.assertTrue
func_call
opendbc/safety/tests/test_volkswagen_pq.py
test_spam_cancel_safety_check
TestVolkswagenPqStockSafety
125
null
commaai/opendbc
import pytest from opendbc.car.can_definitions import CanData from opendbc.car.car_helpers import FRAME_FINGERPRINT, can_fingerprint from opendbc.car.fingerprints import _FINGERPRINTS as FINGERPRINTS class TestCanFingerprint: @pytest.mark.parametrize("car_model, fingerprints", FINGERPRINTS.items()) def test_can_fi...
{}
assert
collection
opendbc/car/tests/test_can_fingerprint.py
test_can_fingerprint
TestCanFingerprint
22
null
commaai/opendbc
from hypothesis import given, settings, strategies as st from opendbc.car import Bus from opendbc.car.structs import CarParams from opendbc.car.fw_versions import build_fw_dict from opendbc.car.toyota.fingerprints import FW_VERSIONS from opendbc.car.toyota.values import CAR, DBC, TSS2_CAR, ANGLE_CONTROL_CAR, RADAR_ACC...
present_ecus
assert
variable
opendbc/car/toyota/tests/test_toyota.py
test_essential_ecus
TestToyotaInterfaces
47
null
commaai/opendbc
import unittest import opendbc.safety.tests.common as common from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py class TestAllOutput(TestDefaultRxHookBase): TX_MSGS = [[addr, bus] for addr in common.SafetyTest.SCANNED_ADDRS for bus in range(4)] def setU...
f"allowed TX {addr=} {bus=}")
self.assertEqual
string_literal
opendbc/safety/tests/test_defaults.py
test_spam_can_buses
TestAllOutput
52
null
commaai/opendbc
import os import abc import math import unittest import importlib import numpy as np from collections.abc import Callable from opendbc.can import CANPacker from opendbc.safety import ALTERNATIVE_EXPERIENCE from opendbc.safety.tests.libsafety import libsafety_py MAX_WRONG_COUNTERS = 5 MAX_SAMPLE_VALS = 6 VEHICLE_SPEED...
tx)
self.assertEqual
variable
opendbc/safety/tests/common.py
test_steer_req_bit_frames
SteerRequestCutSafetyTest
348
null
commaai/opendbc
from parameterized import parameterized_class import unittest from opendbc.car.hyundai.values import HyundaiSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety ...
self._tx(self._acc_cancel_msg(True)))
self.assertTrue
func_call
opendbc/safety/tests/test_hyundai_canfd.py
test_acc_cancel
TestHyundaiCanfdLFASteeringAltButtonsBase
149
null
commaai/opendbc
from collections import defaultdict import pytest from opendbc.car.car_helpers import interfaces from opendbc.car.docs import get_all_car_docs from opendbc.car.docs_definitions import Cable, Column, PartType, Star, SupportType from opendbc.car.honda.values import CAR as HONDA from opendbc.car.values import PLATFORMS ...
tokens
assert
variable
opendbc/car/tests/test_docs.py
test_naming_conventions
TestCarDocs
40
null
commaai/opendbc
import unittest import numpy as np from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety from opendbc.car.volkswagen.values import VolkswagenSafetyFlags MAX_ACCEL = 2.0 MIN_A...
self.safety.get_brake_pressed_prev())
self.assertFalse
func_call
opendbc/safety/tests/test_volkswagen_mqb.py
test_redundant_brake_signals
TestVolkswagenMqbSafetyBase
103
null
commaai/opendbc
import numpy as np import random import unittest import itertools from opendbc.car.toyota.values import ToyotaSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafet...
self.safety.get_controls_allowed())
self.assertFalse
func_call
opendbc/safety/tests/test_toyota.py
test_rx_hook
TestToyotaSafetyBase
123
null
commaai/opendbc
import unittest from opendbc.car.structs import CarParams import opendbc.safety.tests.common as common from opendbc.safety.tests.libsafety import libsafety_py from opendbc.safety.tests.common import CANPackerSafety class TestBody(common.SafetyTest): TX_MSGS = [[0x250, 0], [0x251, 0], [0x1, 0], [0x1, 1]...
self._rx(self._motors_data_msg(0, 0)))
self.assertTrue
func_call
opendbc/safety/tests/test_body.py
test_rx_hook
TestBody
40
null
commaai/opendbc
import unittest import opendbc.safety.tests.common as common from opendbc.car.structs import CarParams from opendbc.safety import DLC_TO_LEN from opendbc.safety.tests.libsafety import libsafety_py from opendbc.safety.tests.test_defaults import TestDefaultRxHookBase GM_CAMERA_DIAG_ADDR = 0x24B class TestElm327(TestDe...
self._tx(common.make_msg(bus, addr, 8)))
self.assertEqual
func_call
opendbc/safety/tests/test_elm327.py
test_tx_hook
TestElm327
30
null
commaai/opendbc
import os import glob import pytest import shutil import subprocess import tempfile import random HERE = os.path.abspath(os.path.dirname(__file__)) ROOT = os.path.join(HERE, "../../../../") IGNORED_PATHS = ( 'opendbc/safety/main.c', 'opendbc/safety/tests/', ) mutations = [ # no mutation, should pass (None, N...
r.stdout
assert
complex_expr
opendbc/safety/tests/misra/test_mutation.py
test_misra_mutation
66
null
commaai/opendbc
import random import unittest import numpy as np from opendbc.car.lateral import get_max_angle_delta_vm, get_max_angle_vm from opendbc.car.tesla.teslacan import get_steer_ctrl_type from opendbc.car.tesla.values import CarControllerParams, TeslaSafetyFlags, TeslaFlags from opendbc.car.tesla.carcontroller import get_saf...
self._rx(msg))
self.assertEqual
func_call
opendbc/safety/tests/test_tesla.py
test_user_brake_quality_flag
TestTeslaSafetyBase
212
null
commaai/opendbc
from parameterized import parameterized_class import unittest from opendbc.car.hyundai.values import HyundaiSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety ...
self._tx(self._button_msg(btn)))
self.assertFalse
func_call
opendbc/safety/tests/test_hyundai_canfd.py
test_button_sends
TestHyundaiCanfdLFASteeringAltButtonsBase
143
null
commaai/opendbc
import random from collections.abc import Iterable from hypothesis import settings, given, strategies as st from parameterized import parameterized from opendbc.car.structs import CarParams from opendbc.car.fw_versions import build_fw_dict from opendbc.car.ford.values import CAR, FW_QUERY_CONFIG, FW_PATTERN, get_plat...
24
assert
numeric_literal
opendbc/car/ford/tests/test_ford.py
test_fw_versions
TestFordFW
58
null
commaai/opendbc
import pytest import math import numpy as np from opendbc.car.honda.interface import CarInterface from opendbc.car.honda.values import CAR from opendbc.car.vehicle_model import VehicleModel, dyn_ss_sol, create_dyn_state_matrices class TestVehicleModel: def setup_method(self): CP = CarInterface.get_non_essentia...
new_sa)
pytest.approx
variable
opendbc/car/tests/test_vehicle_model.py
test_round_trip_yaw_rate
TestVehicleModel
24
null
commaai/opendbc
import random from collections.abc import Iterable from hypothesis import settings, given, strategies as st from parameterized import parameterized from opendbc.car.structs import CarParams from opendbc.car.fw_versions import build_fw_dict from opendbc.car.ford.values import CAR, FW_QUERY_CONFIG, FW_PATTERN, get_plat...
None
assert
none_literal
opendbc/car/ford/tests/test_ford.py
test_fw_query_config
TestFordFW
48
null
commaai/opendbc
import pytest from opendbc.can import CANDefine, CANPacker, CANParser from opendbc.can.tests import TEST_DBC class TestCanParserPackerExceptions: def test_civic_exceptions(self): dbc_file = "honda_civic_touring_2016_can_generated" dbc_invalid = dbc_file + "abcdef" msgs = [("STEERING_CONTROL", 50)] w...
KeyError)
pytest.raises
variable
opendbc/can/tests/test_dbc_exceptions.py
test_civic_exceptions
TestCanParserPackerExceptions
18
null
commaai/opendbc
import numpy as np import random import unittest import opendbc.safety.tests.common as common from opendbc.car.ford.carcontroller import MAX_LATERAL_ACCEL from opendbc.car.ford.values import FordSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py from opendbc.s...
round(-curvature * self.DEG_TO_CAN))
self.assertEqual
func_call
opendbc/safety/tests/test_ford.py
test_angle_measurements
TestFordSafetyBase
231
null
commaai/opendbc
import numpy as np import random import unittest import itertools from opendbc.car.toyota.values import ToyotaSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafet...
self._tx(self._lta_msg(1, 1, angle, 0)))
self.assertTrue
func_call
opendbc/safety/tests/test_toyota.py
test_lta_steer_cmd
TestToyotaSafetyAngle
219
null
commaai/opendbc
import random import unittest import numpy as np from opendbc.car.lateral import get_max_angle_delta_vm, get_max_angle_vm from opendbc.car.tesla.teslacan import get_steer_ctrl_type from opendbc.car.tesla.values import CarControllerParams, TeslaSafetyFlags, TeslaFlags from opendbc.car.tesla.carcontroller import get_saf...
self._rx(self._speed_msg(0)))
self.assertTrue
func_call
opendbc/safety/tests/test_tesla.py
test_rx_hook_speed_mismatch
TestTeslaSafetyBase
205
null
commaai/opendbc
import pytest import random from opendbc.can import CANPacker, CANParser from opendbc.can.tests import TEST_DBC MAX_BAD_COUNTER = 5 class TestCanParserPacker: def test_subaru(self): # Subaru is little endian dbc_file = "subaru_global_2017_generated" msgs = [("ES_LKAS", 50)] parser = CANParser(d...
1)
pytest.approx
numeric_literal
opendbc/can/tests/test_packer_parser.py
test_subaru
TestCanParserPacker
216
null
commaai/opendbc
import unittest from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety LANE_KEEP_ASSIST = 0x3F2 class TestPsaSafetyBase(common.CarSafetyTest, common.AngleSteeringSafetyTest)...
self._rx(msg))
self.assertFalse
func_call
opendbc/safety/tests/test_psa.py
test_rx_hook
TestPsaSafetyBase
65
null
commaai/opendbc
import numpy as np import random import unittest import itertools from opendbc.car.toyota.values import ToyotaSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafet...
self._tx(msg))
self.assertEqual
func_call
opendbc/safety/tests/test_toyota.py
test_block_aeb
TestToyotaSafetyBase
95
null
commaai/opendbc
import random from collections.abc import Iterable from hypothesis import settings, given, strategies as st from parameterized import parameterized from opendbc.car.structs import CarParams from opendbc.car.fw_versions import build_fw_dict from opendbc.car.ford.values import CAR, FW_QUERY_CONFIG, FW_PATTERN, get_plat...
{expected_fingerprint}
assert
collection
opendbc/car/ford/tests/test_ford.py
test_match_fw_fuzzy
TestFordFW
132
null
commaai/opendbc
import random import unittest import numpy as np from opendbc.car.lateral import get_max_angle_delta_vm, get_max_angle_vm from opendbc.car.tesla.teslacan import get_steer_ctrl_type from opendbc.car.tesla.values import CarControllerParams, TeslaSafetyFlags, TeslaFlags from opendbc.car.tesla.carcontroller import get_saf...
self._rx(self._speed_msg(speed)))
self.assertTrue
func_call
opendbc/safety/tests/test_tesla.py
test_rx_hook_speed_mismatch
TestTeslaSafetyBase
195
null
commaai/opendbc
import pytest import random from opendbc.can import CANPacker, CANParser from opendbc.can.tests import TEST_DBC MAX_BAD_COUNTER = 5 class TestCanParserPacker: def test_packer_counter(self): msgs = [("CAN_FD_MESSAGE", 0), ] packer = CANPacker(TEST_DBC) parser = CANParser(TEST_DBC, msgs, 0) # packe...
cnt
assert
variable
opendbc/can/tests/test_packer_parser.py
test_packer_counter
TestCanParserPacker
41
null
commaai/opendbc
import pytest from opendbc.car.can_definitions import CanData from opendbc.car.car_helpers import FRAME_FINGERPRINT, can_fingerprint from opendbc.car.fingerprints import _FINGERPRINTS as FINGERPRINTS class TestCanFingerprint: @pytest.mark.parametrize("car_model, fingerprints", FINGERPRINTS.items()) def test_can_fi...
car_model
assert
variable
opendbc/car/tests/test_can_fingerprint.py
test_can_fingerprint
TestCanFingerprint
19
null
commaai/opendbc
import numpy as np import random import unittest import itertools from opendbc.car.toyota.values import ToyotaSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafet...
final_angle)
self.assertEqual
variable
opendbc/safety/tests/test_toyota.py
test_angle_measurements
TestToyotaSafetyAngle
241
null
commaai/opendbc
import pytest import random from opendbc.can import CANPacker, CANParser from opendbc.can.tests import TEST_DBC MAX_BAD_COUNTER = 5 class TestCanParserPacker: def test_parser_no_partial_update(self): """ Ensure that the CANParser doesn't partially update messages with invalid signals (COUNTER/CHECKSUM). ...
[100]
assert
collection
opendbc/can/tests/test_packer_parser.py
test_parser_no_partial_update
TestCanParserPacker
129
null
commaai/opendbc
import unittest import numpy as np from opendbc.car.honda.values import HondaSafetyFlags from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.car.structs import CarParams from opendbc.safety.tests.common import CANPackerSafety, MAX_WRONG_COUNTERS HONDA_N_CO...
(controls_allowed, accel))
self.assertEqual
collection
opendbc/safety/tests/test_honda.py
test_brake_safety_check
TestHondaBoschLongSafety
499
null
commaai/opendbc
import unittest from opendbc.car.chrysler.values import ChryslerSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety class TestChryslerSafety(common.CarSafetyTe...
self._tx(self._button_msg(cancel=True)))
self.assertTrue
func_call
opendbc/safety/tests/test_chrysler.py
test_buttons
TestChryslerSafety
68
null
commaai/opendbc
import unittest from opendbc.car.structs import CarParams import opendbc.safety.tests.common as common from opendbc.safety.tests.libsafety import libsafety_py from opendbc.safety.tests.common import CANPackerSafety class TestBody(common.SafetyTest): TX_MSGS = [[0x250, 0], [0x251, 0], [0x1, 0], [0x1, 1]...
self.safety.get_controls_allowed())
self.assertFalse
func_call
opendbc/safety/tests/test_body.py
test_rx_hook
TestBody
34
null
commaai/opendbc
import pytest import random from opendbc.can import CANPacker, CANParser from opendbc.can.tests import TEST_DBC MAX_BAD_COUNTER = 5 class TestCanParserPacker: def test_scale_offset(self): """Test that both scale and offset are correctly preserved""" dbc_file = "honda_civic_touring_2016_can_generated" ...
brake)
pytest.approx
variable
opendbc/can/tests/test_packer_parser.py
test_scale_offset
TestCanParserPacker
190
null
commaai/opendbc
from hypothesis import given, settings, strategies as st from opendbc.car import Bus from opendbc.car.structs import CarParams from opendbc.car.fw_versions import build_fw_dict from opendbc.car.toyota.fingerprints import FW_VERSIONS from opendbc.car.toyota.values import CAR, DBC, TSS2_CAR, ANGLE_CONTROL_CAR, RADAR_ACC...
len(result)
assert
func_call
opendbc/car/toyota/tests/test_toyota.py
test_fw_format
TestToyotaFingerprint
109
null
commaai/opendbc
import unittest from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety MSG_LH_EPS_03 = 0x9F # RX from EPS, for driver steering torque MSG_ESP_03 = 0x103 # RX from ABS,...
self.safety.get_brake_pressed_prev())
self.assertFalse
func_call
opendbc/safety/tests/test_volkswagen_mlb.py
test_redundant_brake_signals
TestVolkswagenMlbSafetyBase
85
null
commaai/opendbc
import unittest import numpy as np from opendbc.car.honda.values import HondaSafetyFlags from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.car.structs import CarParams from opendbc.safety.tests.common import CANPackerSafety, MAX_WRONG_COUNTERS HONDA_N_CO...
self._rx(msg))
self.assertTrue
func_call
opendbc/safety/tests/test_honda.py
test_rx_hook
HondaButtonEnableBase
101
null
commaai/opendbc
import unittest from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety from opendbc.car.rivian.values import RivianSafetyFlags from opendbc.car.rivian.riviancan import checksu...
self._rx(msg))
self.assertFalse
func_call
opendbc/safety/tests/test_rivian.py
test_rx_hook
TestRivianSafetyBase
109
null
commaai/opendbc
from collections import defaultdict import pytest from opendbc.car.car_helpers import interfaces from opendbc.car.docs import get_all_car_docs from opendbc.car.docs_definitions import Cable, Column, PartType, Star, SupportType from opendbc.car.honda.values import CAR as HONDA from opendbc.car.values import PLATFORMS ...
1
assert
numeric_literal
opendbc/car/tests/test_docs.py
test_harnesses
TestCarDocs
77
null
commaai/opendbc
import unittest from opendbc.car.gm.values import GMSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety class TestGmCameraSafety(TestGmCameraSafetyBase): TX_...
self._tx(self._button_msg(btn)))
self.assertFalse
func_call
opendbc/safety/tests/test_gm.py
test_buttons
TestGmCameraSafety
193
null
commaai/opendbc
import unittest from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety LANE_KEEP_ASSIST = 0x3F2 class TestPsaSafetyBase(common.CarSafetyTest, common.AngleSteeringSafetyTest)...
self._rx(self._pcm_status_msg(0)))
self.assertTrue
func_call
opendbc/safety/tests/test_psa.py
test_rx_hook
TestPsaSafetyBase
69
null
commaai/opendbc
import unittest from opendbc.car.volkswagen.values import VolkswagenSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety MSG_LENKHILFE_3 = 0x0D0 # RX from...
self.safety.get_torque_driver_max())
self.assertEqual
func_call
opendbc/safety/tests/test_volkswagen_pq.py
test_torque_measurements
TestVolkswagenPqSafetyBase
101
null
commaai/opendbc
import random import unittest from opendbc.car.hyundai.values import HyundaiSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety from opendbc.safety.tests.hyunda...
self._tx(self._fca11_msg(vsm_aeb_req=True)))
self.assertFalse
func_call
opendbc/safety/tests/test_hyundai.py
test_no_aeb_fca11
TestHyundaiLongitudinalSafety
231
null
commaai/opendbc
import unittest from opendbc.car.nissan.values import NissanSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety class TestNissanSafety(common.CarSafetyTest, co...
should_tx)
self.assertEqual
variable
opendbc/safety/tests/test_nissan.py
test_acc_buttons
TestNissanSafety
80
null
commaai/opendbc
import pytest import random import time from collections import defaultdict from opendbc.car.can_definitions import CanData from opendbc.car.car_helpers import interfaces from opendbc.car.structs import CarParams from opendbc.car.fingerprints import FW_VERSIONS from opendbc.car.fw_versions import FW_QUERY_CONFIGS, FUZ...
0
assert
numeric_literal
opendbc/car/tests/test_fw_fingerprint.py
test_brand_ecu_matches
TestFwFingerprint
183
null
commaai/opendbc
import unittest from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety MSG_LH_EPS_03 = 0x9F # RX from EPS, for driver steering torque MSG_ESP_03 = 0x103 # RX from ABS,...
f"expected {brake_pressed=} with {motor_03_signal=} and {esp_05_signal=}")
self.assertEqual
string_literal
opendbc/safety/tests/test_volkswagen_mlb.py
test_redundant_brake_signals
TestVolkswagenMlbSafetyBase
88
null
commaai/opendbc
import numpy as np import random import unittest import itertools from opendbc.car.toyota.values import ToyotaSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafet...
f"{req=} {req2=} {angle=} {torque_wind_down=}")
self.assertEqual
string_literal
opendbc/safety/tests/test_toyota.py
test_lta_steer_cmd
TestToyotaSafetyBase
106
null
commaai/opendbc
from hypothesis import given, settings, strategies as st from opendbc.car import Bus from opendbc.car.structs import CarParams from opendbc.car.fw_versions import build_fw_dict from opendbc.car.toyota.fingerprints import FW_VERSIONS from opendbc.car.toyota.values import CAR, DBC, TSS2_CAR, ANGLE_CONTROL_CAR, RADAR_ACC...
{b"8646F-41-04": {b"100"}}
assert
collection
opendbc/car/toyota/tests/test_toyota.py
test_platform_codes_spot_check
TestToyotaFingerprint
132
null
commaai/opendbc
import argparse import os import pickle import re import subprocess import sys import tempfile import traceback import zstandard as zstd from tqdm import tqdm from tqdm.contrib.concurrent import process_map from urllib.request import urlopen from collections import defaultdict from pathlib import Path from typing impor...
0
assert
numeric_literal
opendbc/car/tests/car_diff.py
main
282
null
commaai/opendbc
import pytest import random import time from collections import defaultdict from opendbc.car.can_definitions import CanData from opendbc.car.car_helpers import interfaces from opendbc.car.structs import CarParams from opendbc.car.fingerprints import FW_VERSIONS from opendbc.car.fw_versions import FW_QUERY_CONFIGS, FUZ...
expected
assert
variable
opendbc/car/tests/test_fw_fingerprint.py
assertFingerprints
TestFwFingerprint
24
null
commaai/opendbc
import unittest import numpy as np from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety from opendbc.car.volkswagen.values import VolkswagenSafetyFlags MAX_ACCEL = 2.0 MIN_A...
(controls_allowed, accel))
self.assertEqual
collection
opendbc/safety/tests/test_volkswagen_mqb.py
test_accel_safety_check
TestVolkswagenMqbLongSafety
208
null
commaai/opendbc
from opendbc.can import CANParser from opendbc.can.tests import ALL_DBCS class TestDBCParser: def test_enough_dbcs(self): # sanity check that we're running on the real DBCs assert len(ALL_DBCS) >
20
assert
numeric_literal
opendbc/can/tests/test_dbc_parser.py
test_enough_dbcs
TestDBCParser
8
null
commaai/opendbc
import unittest from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety MSG_LH_EPS_03 = 0x9F # RX from EPS, for driver steering torque MSG_ESP_03 = 0x103 # RX from ABS,...
self._tx(self._ls_01_msg(resume=1)))
self.assertFalse
func_call
opendbc/safety/tests/test_volkswagen_mlb.py
test_spam_cancel_safety_check
TestVolkswagenMlbStockSafety
126
null
commaai/opendbc
import random import unittest from opendbc.car.hyundai.values import HyundaiSafetyFlags from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety from opendbc.safety.tests.hyunda...
self._tx(self._fca11_msg(aeb_decel=1.0)))
self.assertFalse
func_call
opendbc/safety/tests/test_hyundai.py
test_no_aeb_fca11
TestHyundaiLongitudinalSafety
233
null
commaai/opendbc
import unittest import numpy as np from opendbc.car.honda.values import HondaSafetyFlags from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.car.structs import CarParams from opendbc.safety.tests.common import CANPackerSafety, MAX_WRONG_COUNTERS HONDA_N_CO...
self.safety.get_honda_fwd_brake())
self.assertFalse
func_call
opendbc/safety/tests/test_honda.py
test_honda_fwd_brake_latching
TestHondaNidecSafetyBase
295
null
commaai/opendbc
import random import re from opendbc.car import DT_CTRL from opendbc.car.structs import CarParams from opendbc.car.volkswagen.carcontroller import HCAMitigation from opendbc.car.volkswagen.values import CAR, CarControllerParams as CCP, FW_QUERY_CONFIG, WMI from opendbc.car.volkswagen.fingerprints import FW_VERSIONS E...
0
assert
numeric_literal
opendbc/car/volkswagen/tests/test_volkswagen.py
test_chassis_codes
TestVolkswagenPlatformConfigs
43
null
commaai/opendbc
import random import unittest import numpy as np from opendbc.car.lateral import get_max_angle_delta_vm, get_max_angle_vm from opendbc.car.tesla.teslacan import get_steer_ctrl_type from opendbc.car.tesla.values import CarControllerParams, TeslaSafetyFlags, TeslaFlags from opendbc.car.tesla.carcontroller import get_saf...
should_tx)
self.assertEqual
variable
opendbc/safety/tests/test_tesla.py
test_no_aeb
TestTeslaStockSafety
383
null
commaai/opendbc
import random import re from opendbc.car import DT_CTRL from opendbc.car.structs import CarParams from opendbc.car.volkswagen.carcontroller import HCAMitigation from opendbc.car.volkswagen.values import CAR, CarControllerParams as CCP, FW_QUERY_CONFIG, WMI from opendbc.car.volkswagen.fingerprints import FW_VERSIONS E...
matches
assert
variable
opendbc/car/volkswagen/tests/test_volkswagen.py
test_custom_fuzzy_fingerprinting
TestVolkswagenPlatformConfigs
76
null
commaai/opendbc
import unittest import numpy as np from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety from opendbc.car.volkswagen.values import VolkswagenSafetyFlags MAX_ACCEL = 2.0 MIN_A...
self._tx(self._gra_acc_01_msg(cancel=1)))
self.assertTrue
func_call
opendbc/safety/tests/test_volkswagen_mqb.py
test_spam_cancel_safety_check
TestVolkswagenMqbStockSafety
142
null
commaai/opendbc
import unittest from opendbc.car.structs import CarParams from opendbc.safety.tests.libsafety import libsafety_py import opendbc.safety.tests.common as common from opendbc.safety.tests.common import CANPackerSafety MSG_LH_EPS_03 = 0x9F # RX from EPS, for driver steering torque MSG_ESP_03 = 0x103 # RX from ABS,...
self._tx(self._ls_01_msg(_set=1)))
self.assertFalse
func_call
opendbc/safety/tests/test_volkswagen_mlb.py
test_spam_cancel_safety_check
TestVolkswagenMlbStockSafety
127
null