


'''simple docstring'''


def 			snake_case_   (  SCREAMING_SNAKE_CASE__							,      SCREAMING_SNAKE_CASE__     ):







				"""simple docstring"""





				_SCREAMING_SNAKE_CASE :       str     		=      """"""
				for word_or_phrase in separated:
								if not isinstance(SCREAMING_SNAKE_CASE__							,      SCREAMING_SNAKE_CASE__     ):
												raise Exception("""join() accepts only strings to be joined"""     )
								joined += word_or_phrase + separator
				return joined.strip(SCREAMING_SNAKE_CASE__     )


if __name__ == "__main__":
				from doctest import testmod

				testmod()








'''simple docstring'''


import unittest

from knapsack import greedy_knapsack as kp





class     lowercase__  (						unittest.TestCase					):





							'''simple docstring'''


							def UpperCAmelCase_	(    self  ):
											_SCREAMING_SNAKE_CASE :       str     		=      [10, 20, 30, 40, 50, 60]
											_SCREAMING_SNAKE_CASE :       List[str]     		=      [2, 4, 6, 8, 10, 12]
											_SCREAMING_SNAKE_CASE :       str     		=      100
											self.assertEqual(kp.calc_profit(__snake_case    ,					__snake_case    ,					__snake_case  )    ,					210  )






							def UpperCAmelCase_	(    self  ):
											self.assertRaisesRegex(__snake_case    ,					"""max_weight must greater than zero."""  )






							def UpperCAmelCase_	(    self  ):
											self.assertRaisesRegex(__snake_case    ,					"""Weight can not be negative."""  )






							def UpperCAmelCase_	(    self  ):
											self.assertRaisesRegex(__snake_case    ,					"""Profit can not be negative."""  )






							def UpperCAmelCase_	(    self  ):
											self.assertRaisesRegex(__snake_case    ,					"""max_weight must greater than zero."""  )






							def UpperCAmelCase_	(    self  ):
											self.assertRaisesRegex(
											    __snake_case    ,					"""The length of profit and weight must be same."""  )


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




