MCPcopy
hub / github.com/commaai/openpilot / test_offroad_alerts

Method test_offroad_alerts

selfdrive/selfdrived/tests/test_alerts.py:107–118  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

105 assert a.creation_delay == 0.
106
107 def test_offroad_alerts(self):
108 params = Params()
109 for a in self.offroad_alerts:
110 # set the alert
111 alert = copy.copy(self.offroad_alerts[a])
112 set_offroad_alert(a, True)
113 alert['extra'] = ''
114 assert alert == params.get(a)
115
116 # then delete it
117 set_offroad_alert(a, False)
118 assert params.get(a) is None
119
120 def test_offroad_alerts_extra_text(self):
121 params = Params()

Callers

nothing calls this directly

Calls 2

set_offroad_alertFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected