import unittest

from knapsack import greedy_knapsack as kp






class 		_lowerCamelCase		( unittest.TestCase     ):
    def     UpperCamelCase_					(	self )							->       Tuple:
     SCREAMING_SNAKE_CASE__: Union[str, Any]=   [10, 20, 30, 40, 50, 60]
     SCREAMING_SNAKE_CASE__: str=   [2, 4, 6, 8, 10, 12]
     SCREAMING_SNAKE_CASE__: Tuple=   100
     self.assertEqual(kp.calc_profit(lowerCAmelCase			,			lowerCAmelCase			,			lowerCAmelCase )			,			210 )
    def     UpperCamelCase_					(	self )							->       str:
     self.assertRaisesRegex(lowerCAmelCase			,			'''max_weight must greater than zero.''' )
    def     UpperCamelCase_					(	self )							->       Dict:
     self.assertRaisesRegex(lowerCAmelCase			,			'''Weight can not be negative.''' )
    def     UpperCamelCase_					(	self )							->       Tuple:
     self.assertRaisesRegex(lowerCAmelCase			,			'''Profit can not be negative.''' )
    def     UpperCamelCase_					(	self )							->       List[Any]:
     self.assertRaisesRegex(lowerCAmelCase			,			'''max_weight must greater than zero.''' )



    def     UpperCamelCase_					(	self )							->       int:
     self.assertRaisesRegex(
         lowerCAmelCase			,			'''The length of profit and weight must be same.''' )


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


'''simple docstring'''




def __lowerCAmelCase					(				UpperCamelCase__							,    UpperCamelCase__							)      ->       float:
    if digit_amount > 0:
        return round(number - int(UpperCamelCase__							)							,    UpperCamelCase__							)
    return number - int(UpperCamelCase__							)


if __name__ == "__main__":
  print(decimal_isolate(1.53, 0))
  print(decimal_isolate(35.345, 1))
  print(decimal_isolate(35.345, 2))
  print(decimal_isolate(35.345, 3))
  print(decimal_isolate(-14.789, 3))
  print(decimal_isolate(0, 2))
  print(decimal_isolate(-14.123, 1))
  print(decimal_isolate(-14.123, 2))
  print(decimal_isolate(-14.123, 3))
