

'''simple docstring'''







import unittest

from knapsack import greedy_knapsack as kp


class 					A__      (      unittest.TestCase			):



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





           '''simple docstring'''
           A_						=      [10, 20, 30, 40, 50, 60]
           A_						=      [2, 4, 6, 8, 10, 12]
           A_						=      100
           self.assertEqual(kp.calc_profit(__a		,				__a		,				__a       )		,				210       )



    def 					snake_case_			(					self       )						->      str:





           '''simple docstring'''
           self.assertRaisesRegex(__a		,				"""max_weight must greater than zero."""       )



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





           '''simple docstring'''
           self.assertRaisesRegex(__a		,				"""Weight can not be negative."""       )



    def 					snake_case_			(					self       )						->      Dict:





           '''simple docstring'''
           self.assertRaisesRegex(__a		,				"""Profit can not be negative."""       )



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





           '''simple docstring'''
           self.assertRaisesRegex(__a		,				"""max_weight must greater than zero."""       )







    def 					snake_case_			(					self       )						->      Tuple:





           '''simple docstring'''
           self.assertRaisesRegex(
               __a		,				"""The length of profit and weight must be same."""       )


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



'''simple docstring'''







def       UpperCAmelCase__    (      UpperCAmelCase__				)			->			bool:
       if num < 0:
              return False

       A_						=      num
       A_						=      0
       while num > 0:
              A_						=      rev_num * 10 + (num % 10)
              num //= 10

       return num_copy == rev_num


if __name__ == "__main__":
      import doctest

      doctest.testmod()
