
import unittest

from knapsack import greedy_knapsack as kp




class        UpperCAmelCase_			( unittest.TestCase     ):


  '''simple docstring'''







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







    """simple docstring"""






    __magic_name__				     =       [10, 20, 30, 40, 50, 60]
    __magic_name__				     =       [2, 4, 6, 8, 10, 12]
    __magic_name__				     =       100
    self.assertEqual(kp.calc_profit(UpperCamelCase__			,							UpperCamelCase__			,							UpperCamelCase__    )			,							210    )
  def 							_lowercase							( self			: Tuple    )			->	Optional[int]:







    """simple docstring"""






    self.assertRaisesRegex(UpperCamelCase__			,							"""max_weight must greater than zero."""    )
  def 							_lowercase							( self			: Union[str, Any]    )			->	Optional[int]:







    """simple docstring"""






    self.assertRaisesRegex(UpperCamelCase__			,							"""Weight can not be negative."""    )
  def 							_lowercase							( self			: Optional[Any]    )			->	Optional[int]:







    """simple docstring"""






    self.assertRaisesRegex(UpperCamelCase__			,							"""Profit can not be negative."""    )
  def 							_lowercase							( self			: Union[str, Any]    )			->	Any:







    """simple docstring"""






    self.assertRaisesRegex(UpperCamelCase__			,							"""max_weight must greater than zero."""    )





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







    """simple docstring"""






    self.assertRaisesRegex(
        UpperCamelCase__			,							"""The length of profit and weight must be same."""    )


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


"""simple docstring"""


import warnings


warnings.warn(
    """memory_utils has been reorganized to utils.memory. Import `find_executable_batchsize` from the main `__init__`: """
    """`from accelerate import find_executable_batch_size` to avoid this warning.""",
    FutureWarning,
)
