  
  
  if __name__ == "__main__":
    unittest.main()
 
</s> remove         lr = LogReader(get_url(cls.test_route.route, seg))
 </s> add         if cls.ci:
          lr = LogReader(get_url(cls.test_route.route, seg))
        else:
          lr = LogReader(Route(cls.test_route.route).log_paths()[seg]) </s> remove @parameterized_class(('car_model', 'test_route'), test_cases)
class TestCarModel(unittest.TestCase):
 </s> add class TestCarModelBase(unittest.TestCase):
  car_model = None
  test_route = None
  ci = True </s> remove   routes_by_car[r.car_fingerprint].add(r)
 </s> add   routes_by_car[r.car_model].add(r)
@parameterized_class(('car_model', 'test_route'), test_cases)
class TestCarModel(TestCarModelBase):
  pass


  
  
@parameterized_class(('car_model', 'test_route'), test_cases)
class TestCarModel(TestCarModelBase):
  pass


  if __name__ == "__main__":
    unittest.main()
keep add keep keep
 test_models: support for running on any route (#24002)

* run test_models on route

* clean up a bit

clean up a bit

clean up a bit

* remove

remove

* make route positional

* fixes from merge

* not working as I expected

* finally working, easiest way seems to make a new subclass dynamically

* bring back routes

* remove comments

* revert skiptest

* fix subclass name

* car first

* this should be here...

* this should work

* comment

* pytest doesn't support dynamically loading with load_tests

* minimize test_models.py diff, and make new file for running on a route

* fix static analysis

* remove print

* clean up a tiny bit

* rename and make required

* auto detect car fingerprint if not given

* move to location that makes more sense

* Add ci argument for running route from routes.py 
selfdrive/car/tests/test_models.py