import unittest

from knapsack import greedy_knapsack as kp


class 						lowercase    (     unittest.TestCase     ):




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



												'''simple docstring'''

												SCREAMING_SNAKE_CASE    			=       [10, 20, 30, 40, 50, 60]
												SCREAMING_SNAKE_CASE    			=       [2, 4, 6, 8, 10, 12]
												SCREAMING_SNAKE_CASE    			=       100
												self.assertEqual(kp.calc_profit(_UpperCamelCase	,							_UpperCamelCase	,							_UpperCamelCase      )	,							210      )




							def 	__snake_case(						self   :					Optional[Any]      )					->				str:



												'''simple docstring'''

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




							def 	__snake_case(						self   :					str      )					->				Optional[int]:



												'''simple docstring'''

												self.assertRaisesRegex(_UpperCamelCase	,							"Weight can not be negative."      )




							def 	__snake_case(						self   :					Optional[Any]      )					->				Any:



												'''simple docstring'''

												self.assertRaisesRegex(_UpperCamelCase	,							"Profit can not be negative."      )




							def 	__snake_case(						self   :					Optional[Any]      )					->				Dict:



												'''simple docstring'''

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





							def 	__snake_case(						self   :					int      )					->				str:



												'''simple docstring'''

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


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





def 	__lowerCamelCase							(UpperCAmelCase__     :							int  ):
					assert isinstance(UpperCAmelCase__      , UpperCAmelCase__  ), F"The input value of [n={number}] is not an integer"

					if number == 1:
										return 2
					elif number < 1:
										SCREAMING_SNAKE_CASE    			=       F"The input value of [n={number}] has to be > 0"
										raise ValueError(UpperCAmelCase__  )
					else:
										SCREAMING_SNAKE_CASE    			=       sylvester(number - 1  )
										SCREAMING_SNAKE_CASE    			=       num - 1
										SCREAMING_SNAKE_CASE    			=       num
										return lower * upper + 1


if __name__ == "__main__":
							print(f"""The 8th number in Sylvester's sequence: {sylvester(8)}""")




