@ -7,7 +7,6 @@ from collections import Counter 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					from  parameterized  import  parameterized_class  
					 
					 
					 
					from  parameterized  import  parameterized_class  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					from  cereal  import  log ,  car  
					 
					 
					 
					from  cereal  import  log ,  car  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					import  cereal . messaging  as  messaging  
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					from  selfdrive . car . fingerprints  import  all_known_cars  
					 
					 
					 
					from  selfdrive . car . fingerprints  import  all_known_cars  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					from  selfdrive . car . car_helpers  import  interfaces  
					 
					 
					 
					from  selfdrive . car . car_helpers  import  interfaces  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					from  selfdrive . test . test_car_models  import  routes ,  non_tested_cars  
					 
					 
					 
					from  selfdrive . test . test_car_models  import  routes ,  non_tested_cars  
				
			 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
							 
						
					 
					 
					@ -29,6 +28,7 @@ ignore_can_valid = [ 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					  " TOYOTA COROLLA 2017 " ,   
					 
					 
					 
					  " TOYOTA COROLLA 2017 " ,   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					  " LEXUS RX HYBRID 2017 " ,   
					 
					 
					 
					  " LEXUS RX HYBRID 2017 " ,   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					  " TOYOTA AVALON 2016 " ,   
					 
					 
					 
					  " TOYOTA AVALON 2016 " ,   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					  " HONDA PILOT 2019 ELITE " ,   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					]  
					 
					 
					 
					]  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					@parameterized_class ( ( ' car_model ' ) ,  [ ( car , )  for  car  in  all_known_cars ( ) ] )  
					 
					 
					 
					@parameterized_class ( ( ' car_model ' ) ,  [ ( car , )  for  car  in  all_known_cars ( ) ] )  
				
			 
			
		
	
	
		
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
					 
					@ -99,14 +99,10 @@ class TestCarModel(unittest.TestCase): 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    can_invalid_cnt  =  0   
					 
					 
					 
					    can_invalid_cnt  =  0   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    CC  =  car . CarControl . new_message ( )   
					 
					 
					 
					    CC  =  car . CarControl . new_message ( )   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    for  msg  in  self . can_msgs :   
					 
					 
					 
					    for  msg  in  self . can_msgs :   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					      # filter out openpilot msgs   
					 
					 
					 
					      CS  =  self . CI . update ( CC ,  ( msg . as_builder ( ) . to_bytes ( ) , ) )   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					      can  =  [ m  for  m  in  msg . can  if  m . src  <  128 ]   
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					      can_pkt  =  messaging . new_message ( ' can ' ,  len ( can ) )   
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					      can_pkt . can  =  can   
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					      CS  =  self . CI . update ( CC ,  ( can_pkt . to_bytes ( ) , ) )   
					 
					 
					 
					 
				
			 
			
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					      self . CI . apply ( CC )   
					 
					 
					 
					      self . CI . apply ( CC )   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					      can_invalid_cnt  + =  not  CS . canValid   
					 
					 
					 
					      can_invalid_cnt  + =  not  CS . canValid   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    if  self . car_model  not  in  ignore_can_valid :   
					 
					 
					 
					    if  self . car_model  not  in  ignore_can_valid :   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					      self . assertLess ( can_invalid_cnt ,  50 )   
					 
					 
					 
					      self . assertLess ( can_invalid_cnt ,  50 )