opendbc
opendbc copied to clipboard
pytest: slow collection for `car/tests/`
can/tests/
is 20x faster to collect than car/tests/
.
batman:opendbc$ pytest --co can/tests/
============ 22 tests collected in 0.05s ============
batman:opendbc$ pytest --co car/tests/
============ 1627 tests collected in 1.04s ============
My first suspicion is the use of parameterized. Parameterizing is super important for running all the tests on different car models, so it's worth confirming that it's this and making it faster. Is it faster to just use a for loop?