






import unittest

from diffusers.pipelines.pipeline_utils import is_safetensors_compatible
class 							lowercase    (						unittest.TestCase			):






 '''simple docstring'''




 def  snake_case__				(	self) ->		Dict:

     """simple docstring"""



     _UpperCAmelCase				:      Any			  =				[
         '''safety_checker/pytorch_model.bin''',
         '''safety_checker/model.safetensors''',
         '''vae/diffusion_pytorch_model.bin''',
         '''vae/diffusion_pytorch_model.safetensors''',
         '''text_encoder/pytorch_model.bin''',
         '''text_encoder/model.safetensors''',
         '''unet/diffusion_pytorch_model.bin''',
         '''unet/diffusion_pytorch_model.safetensors''',
     ]
     self.assertTrue(is_safetensors_compatible(_A))


 def  snake_case__				(	self) ->		Tuple:

     """simple docstring"""



     _UpperCAmelCase				:      List[Any]			  =				[
         '''unet/diffusion_pytorch_model.bin''',
         '''unet/diffusion_pytorch_model.safetensors''',
     ]
     self.assertTrue(is_safetensors_compatible(_A))


 def  snake_case__				(	self) ->		List[str]:

     """simple docstring"""



     _UpperCAmelCase				:      List[Any]			  =				[
         '''safety_checker/pytorch_model.bin''',
         '''safety_checker/model.safetensors''',
         '''vae/diffusion_pytorch_model.bin''',
         '''vae/diffusion_pytorch_model.safetensors''',
         '''text_encoder/pytorch_model.bin''',
         '''text_encoder/model.safetensors''',
         '''unet/diffusion_pytorch_model.bin''',
         # Removed: 'unet/diffusion_pytorch_model.safetensors',
     ]
     self.assertFalse(is_safetensors_compatible(_A))


 def  snake_case__				(	self) ->		Optional[int]:

     """simple docstring"""



     _UpperCAmelCase				:      str			  =				[
         '''text_encoder/pytorch_model.bin''',
         '''text_encoder/model.safetensors''',
     ]
     self.assertTrue(is_safetensors_compatible(_A))


 def  snake_case__				(	self) ->		Dict:

     """simple docstring"""



     _UpperCAmelCase				:      str			  =				[
         '''safety_checker/pytorch_model.bin''',
         '''safety_checker/model.safetensors''',
         '''vae/diffusion_pytorch_model.bin''',
         '''vae/diffusion_pytorch_model.safetensors''',
         '''text_encoder/pytorch_model.bin''',
         # Removed: 'text_encoder/model.safetensors',
         '''unet/diffusion_pytorch_model.bin''',
         '''unet/diffusion_pytorch_model.safetensors''',
     ]
     self.assertFalse(is_safetensors_compatible(_A))


 def  snake_case__				(	self) ->		List[Any]:

     """simple docstring"""



     _UpperCAmelCase				:      int			  =				[
         '''safety_checker/pytorch_model.fp16.bin''',
         '''safety_checker/model.fp16.safetensors''',
         '''vae/diffusion_pytorch_model.fp16.bin''',
         '''vae/diffusion_pytorch_model.fp16.safetensors''',
         '''text_encoder/pytorch_model.fp16.bin''',
         '''text_encoder/model.fp16.safetensors''',
         '''unet/diffusion_pytorch_model.fp16.bin''',
         '''unet/diffusion_pytorch_model.fp16.safetensors''',
     ]
     _UpperCAmelCase				:      Tuple			  =				'''fp16'''
     self.assertTrue(is_safetensors_compatible(_A							,  variant=_A))


 def  snake_case__				(	self) ->		str:

     """simple docstring"""



     _UpperCAmelCase				:      Union[str, Any]			  =				[
         '''unet/diffusion_pytorch_model.fp16.bin''',
         '''unet/diffusion_pytorch_model.fp16.safetensors''',
     ]
     _UpperCAmelCase				:      Dict			  =				'''fp16'''
     self.assertTrue(is_safetensors_compatible(_A							,  variant=_A))


 def  snake_case__				(	self) ->		str:

     """simple docstring"""



     _UpperCAmelCase				:      List[str]			  =				[
         '''unet/diffusion_pytorch_model.bin''',
         '''unet/diffusion_pytorch_model.safetensors''',
     ]
     _UpperCAmelCase				:      Any			  =				'''fp16'''
     self.assertTrue(is_safetensors_compatible(_A							,  variant=_A))


 def  snake_case__				(	self) ->		Dict:

     """simple docstring"""



     _UpperCAmelCase				:      int			  =				[
         '''safety_checker/pytorch_model.fp16.bin''',
         '''safety_checker/model.fp16.safetensors''',
         '''vae/diffusion_pytorch_model.fp16.bin''',
         '''vae/diffusion_pytorch_model.fp16.safetensors''',
         '''text_encoder/pytorch_model.fp16.bin''',
         '''text_encoder/model.fp16.safetensors''',
         '''unet/diffusion_pytorch_model.fp16.bin''',
         # Removed: 'unet/diffusion_pytorch_model.fp16.safetensors',
     ]
     _UpperCAmelCase				:      Optional[int]			  =				'''fp16'''
     self.assertFalse(is_safetensors_compatible(_A							,  variant=_A))


 def  snake_case__				(	self) ->		Tuple:

     """simple docstring"""



     _UpperCAmelCase				:      Dict			  =				[
         '''text_encoder/pytorch_model.fp16.bin''',
         '''text_encoder/model.fp16.safetensors''',
     ]
     _UpperCAmelCase				:      Tuple			  =				'''fp16'''
     self.assertTrue(is_safetensors_compatible(_A							,  variant=_A))


 def  snake_case__				(	self) ->		Optional[int]:

     """simple docstring"""



     _UpperCAmelCase				:      Dict			  =				[
         '''text_encoder/pytorch_model.bin''',
         '''text_encoder/model.safetensors''',
     ]
     _UpperCAmelCase				:      Any			  =				'''fp16'''
     self.assertTrue(is_safetensors_compatible(_A							,  variant=_A))


 def  snake_case__				(	self) ->		Optional[int]:

     """simple docstring"""



     _UpperCAmelCase				:      int			  =				[
         '''safety_checker/pytorch_model.fp16.bin''',
         '''safety_checker/model.fp16.safetensors''',
         '''vae/diffusion_pytorch_model.fp16.bin''',
         '''vae/diffusion_pytorch_model.fp16.safetensors''',
         '''text_encoder/pytorch_model.fp16.bin''',
         # 'text_encoder/model.fp16.safetensors',
         '''unet/diffusion_pytorch_model.fp16.bin''',
         '''unet/diffusion_pytorch_model.fp16.safetensors''',
     ]
     _UpperCAmelCase				:      Union[str, Any]			  =				'''fp16'''
     self.assertFalse(is_safetensors_compatible(_A							,  variant=_A))












import unittest

from knapsack import knapsack as k
class 							A_    (						unittest.TestCase			):






 '''simple docstring'''




 def  snake_case__				(	self) ->		Dict:

     """simple docstring"""



     _UpperCAmelCase				:      Optional[int]			  =				0
     _UpperCAmelCase				:      List[Any]			  =				[0]
     _UpperCAmelCase				:      Optional[Any]			  =				[0]
     _UpperCAmelCase				:      Optional[int]			  =				len(_A)
     self.assertEqual(k.knapsack(_A							,  _A							,  _A							,  _A)							,  0)

     _UpperCAmelCase				:      Optional[int]			  =				[60]
     _UpperCAmelCase				:      List[str]			  =				[10]
     _UpperCAmelCase				:      str			  =				len(_A)
     self.assertEqual(k.knapsack(_A							,  _A							,  _A							,  _A)							,  0)


 def  snake_case__				(	self) ->		Union[str, Any]:

     """simple docstring"""



     _UpperCAmelCase				:      Any			  =				3
     _UpperCAmelCase				:      int			  =				[1, 2, 3]
     _UpperCAmelCase				:      List[str]			  =				[3, 2, 1]
     _UpperCAmelCase				:      Union[str, Any]			  =				len(_A)
     self.assertEqual(k.knapsack(_A							,  _A							,  _A							,  _A)							,  5)


 def  snake_case__				(	self) ->		Tuple:

     """simple docstring"""



     _UpperCAmelCase				:      List[str]			  =				50
     _UpperCAmelCase				:      Tuple			  =				[60, 100, 120]
     _UpperCAmelCase				:      Optional[int]			  =				[10, 20, 30]
     _UpperCAmelCase				:      Optional[Any]			  =				len(_A)
     self.assertEqual(k.knapsack(_A							,  _A							,  _A							,  _A)							,  220)


if __name__ == "__main__":
  unittest.main()




