
"""simple docstring"""

import unittest

from knapsack import greedy_knapsack as kp

class __lowerCAmelCase		(      unittest.TestCase			):





     def 						UpperCAmelCase					(	self      ):

      '''simple docstring'''




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





     def 						UpperCAmelCase					(	self      ):

      '''simple docstring'''




      self.assertRaisesRegex(__UpperCAmelCase	,     'max_weight must greater than zero.'      )





     def 						UpperCAmelCase					(	self      ):

      '''simple docstring'''




      self.assertRaisesRegex(__UpperCAmelCase	,     'Weight can not be negative.'      )





     def 						UpperCAmelCase					(	self      ):

      '''simple docstring'''




      self.assertRaisesRegex(__UpperCAmelCase	,     'Profit can not be negative.'      )





     def 						UpperCAmelCase					(	self      ):

      '''simple docstring'''




      self.assertRaisesRegex(__UpperCAmelCase	,     'max_weight must greater than zero.'      )







     def 						UpperCAmelCase					(	self      ):

      '''simple docstring'''




      self.assertRaisesRegex(
          __UpperCAmelCase	,     'The length of profit and weight must be same.'      )


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







'''simple docstring'''







A__:    Tuple					    =       '''
# Installazione di Transformers
! pip install transformers datasets
# Per installare dalla fonte invece dell\'ultima versione rilasciata, commenta il comando sopra e
# rimuovi la modalità commento al comando seguente.
# ! pip install git+https://github.com/huggingface/transformers.git
'''

A__:    Tuple					    =       [{'''type''': '''code''', '''content''': INSTALL_CONTENT}]
A__:    Any					    =       {
    '''{processor_class}''': '''FakeProcessorClass''',
    '''{model_class}''': '''FakeModelClass''',
    '''{object_class}''': '''FakeObjectClass''',
}


