mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 21:14:01 +08:00
CI: enable missing tests (#29538)
This commit is contained in:
23
poetry.lock
generated
23
poetry.lock
generated
@@ -730,6 +730,27 @@ mypy = ["contourpy[bokeh,docs]", "docutils-stubs", "mypy (==1.2.0)", "types-Pill
|
||||
test = ["Pillow", "contourpy[test-no-images]", "matplotlib"]
|
||||
test-no-images = ["pytest", "pytest-cov", "wurlitzer"]
|
||||
|
||||
[[package]]
|
||||
name = "control"
|
||||
version = "0.9.4"
|
||||
description = "Python Control Systems Library"
|
||||
optional = false
|
||||
python-versions = ">=3.8"
|
||||
files = [
|
||||
{file = "control-0.9.4-py3-none-any.whl", hash = "sha256:ab68980abd8d35ae5015ffa090865cbbd926deea7e66d0b9a41cfd12577e63ff"},
|
||||
{file = "control-0.9.4.tar.gz", hash = "sha256:0fa57d2216b7ac4e9339c09eab6827660318a641779335864feee940bd19c9ce"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
matplotlib = "*"
|
||||
numpy = "*"
|
||||
scipy = ">=1.3"
|
||||
|
||||
[package.extras]
|
||||
cvxopt = ["cvxopt (>=1.2.0)"]
|
||||
slycot = ["slycot (>=0.4.0)"]
|
||||
test = ["pytest", "pytest-timeout"]
|
||||
|
||||
[[package]]
|
||||
name = "coverage"
|
||||
version = "7.3.0"
|
||||
@@ -4192,4 +4213,4 @@ multidict = ">=4.0"
|
||||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = "~3.11"
|
||||
content-hash = "39a9e8fd6df654b3f503f9186e75f1a48d726c876696ff64cec9b6f53cc2f22a"
|
||||
content-hash = "320aa5cc075d746403abb872211ebdaf55e9504face8dab8c9b270c71953675d"
|
||||
|
||||
@@ -53,6 +53,7 @@ aiohttp = "*"
|
||||
aiortc = "*"
|
||||
casadi = "==3.6.3"
|
||||
cffi = "*"
|
||||
control = "*"
|
||||
crcmod = "*"
|
||||
cryptography = "*"
|
||||
Cython = "*"
|
||||
|
||||
0
selfdrive/controls/lib/tests/__init__.py
Normal file
0
selfdrive/controls/lib/tests/__init__.py
Normal file
@@ -12,6 +12,7 @@ from openpilot.selfdrive.controls.lib.latcontrol_pid import LatControlPID
|
||||
from openpilot.selfdrive.controls.lib.latcontrol_torque import LatControlTorque
|
||||
from openpilot.selfdrive.controls.lib.latcontrol_angle import LatControlAngle
|
||||
from openpilot.selfdrive.controls.lib.vehicle_model import VehicleModel
|
||||
from selfdrive.navd.tests.test_map_renderer import gen_llk
|
||||
|
||||
|
||||
class TestLatControl(unittest.TestCase):
|
||||
@@ -27,13 +28,15 @@ class TestLatControl(unittest.TestCase):
|
||||
|
||||
CS = car.CarState.new_message()
|
||||
CS.vEgo = 30
|
||||
CS.steeringPressed = False
|
||||
|
||||
last_actuators = car.CarControl.Actuators.new_message()
|
||||
|
||||
params = log.LiveParametersData.new_message()
|
||||
|
||||
llk = gen_llk()
|
||||
for _ in range(1000):
|
||||
_, _, lac_log = controller.update(True, CS, CP, VM, params, last_actuators, True, 1, 0)
|
||||
_, _, lac_log = controller.update(True, CS, VM, params, last_actuators, False, 1, 0, llk)
|
||||
|
||||
self.assertTrue(lac_log.saturated)
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ class TestVehicleModel(unittest.TestCase):
|
||||
|
||||
# Compute yaw rate using direct computations
|
||||
yr2 = self.VM.yaw_rate(sa, u, roll)
|
||||
self.assertAlmostEqual(float(yr1), yr2)
|
||||
self.assertAlmostEqual(float(yr1[0]), yr2)
|
||||
|
||||
def test_syn_ss_sol_simulate(self):
|
||||
"""Verifies that dyn_ss_sol matches a simulation"""
|
||||
|
||||
Reference in New Issue
Block a user