mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-08 09:45:41 +08:00
a5cee30aa6
date: 2024-06-25T13:13:17
commit: 69a099242f
14 lines
312 B
Python
14 lines
312 B
Python
import time
|
|
|
|
from panda import Panda
|
|
|
|
def test_boot_time(p):
|
|
# boot time should be instant
|
|
st = time.monotonic()
|
|
p.reset(reconnect=False)
|
|
assert Panda.wait_for_panda(p.get_usb_serial(), timeout=3.0)
|
|
|
|
# USB enumeration is slow, so SPI is faster
|
|
assert time.monotonic() - st < (1.0 if p.spi else 5.0)
|
|
|