| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -57,7 +57,6 @@ class TestCarInterfaces(unittest.TestCase): | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            phases=(Phase.reuse, Phase.generate)) | 
					 | 
					 | 
					 | 
					            phases=(Phase.reuse, Phase.generate)) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  @given(data=st.data()) | 
					 | 
					 | 
					 | 
					  @given(data=st.data()) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  def test_car_interfaces(self, car_name, data): | 
					 | 
					 | 
					 | 
					  def test_car_interfaces(self, car_name, data): | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    print(car_name) | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    CarInterface, CarController, CarState = interfaces[car_name] | 
					 | 
					 | 
					 | 
					    CarInterface, CarController, CarState = interfaces[car_name] | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    args = get_fuzzy_car_interface_args(data.draw) | 
					 | 
					 | 
					 | 
					    args = get_fuzzy_car_interface_args(data.draw) | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -114,7 +113,6 @@ class TestCarInterfaces(unittest.TestCase): | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    controlsd.initialized = True | 
					 | 
					 | 
					 | 
					    controlsd.initialized = True | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    cs_msg = FuzzyGenerator.get_random_msg(data.draw, car.CarState, real_floats=True, ignore_deprecated=True) | 
					 | 
					 | 
					 | 
					    cs_msg = FuzzyGenerator.get_random_msg(data.draw, car.CarState, real_floats=True, ignore_deprecated=True) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    CS = car.CarState.new_message(**cs_msg) | 
					 | 
					 | 
					 | 
					    CS = car.CarState.new_message(**cs_msg) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    # # print('looping') | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    with (patch('openpilot.selfdrive.car.interfaces.CarInterfaceBase.update', lambda *args, **kwargs: CS), | 
					 | 
					 | 
					 | 
					    with (patch('openpilot.selfdrive.car.interfaces.CarInterfaceBase.update', lambda *args, **kwargs: CS), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          patch('cereal.messaging.drain_sock_raw', lambda *args, **kwargs: [])): | 
					 | 
					 | 
					 | 
					          patch('cereal.messaging.drain_sock_raw', lambda *args, **kwargs: [])): | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      for _ in range(10): | 
					 | 
					 | 
					 | 
					      for _ in range(10): | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -137,8 +135,6 @@ class TestCarInterfaces(unittest.TestCase): | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      rr = radar_interface.update(cans) | 
					 | 
					 | 
					 | 
					      rr = radar_interface.update(cans) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      self.assertTrue(rr is None or len(rr.errors) > 0) | 
					 | 
					 | 
					 | 
					      self.assertTrue(rr is None or len(rr.errors) > 0) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    print('finished!') | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  def test_interface_attrs(self): | 
					 | 
					 | 
					 | 
					  def test_interface_attrs(self): | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    """Asserts basic behavior of interface attribute getter""" | 
					 | 
					 | 
					 | 
					    """Asserts basic behavior of interface attribute getter""" | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    num_brands = len(get_interface_attr('CAR')) | 
					 | 
					 | 
					 | 
					    num_brands = len(get_interface_attr('CAR')) | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |