
import unittest

from knapsack import greedy_knapsack as kp







class        lowerCAmelCase__      (   unittest.TestCase	):

						def  A_				(			self				)					->      Tuple:


								'''simple docstring'''

								_UpperCamelCase						    =	[10, 20, 30, 40, 50, 60]
								_UpperCamelCase						    =	[2, 4, 6, 8, 10, 12]
								_UpperCamelCase						    =	1_00
								self.assertEqual(kp.calc_profit(a       ,							a       ,							a				)       ,							2_10				)

						def  A_				(			self				)					->      str:


								'''simple docstring'''

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

						def  A_				(			self				)					->      Dict:


								'''simple docstring'''

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

						def  A_				(			self				)					->      List[str]:


								'''simple docstring'''

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

						def  A_				(			self				)					->      Dict:


								'''simple docstring'''

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







						def  A_				(			self				)					->      Dict:


								'''simple docstring'''

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


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





from typing import TYPE_CHECKING

from ....utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


lowerCamelCase__	=							{
    "configuration_mctct": ["MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP", "MCTCTConfig"],
    "feature_extraction_mctct": ["MCTCTFeatureExtractor"],
    "processing_mctct": ["MCTCTProcessor"],
}


try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowerCamelCase__	=							[
		    "MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST",
		    "MCTCTForCTC",
		    "MCTCTModel",
		    "MCTCTPreTrainedModel",
		]


if TYPE_CHECKING:
		from .configuration_mctct import MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP, MCTCTConfig
		from .feature_extraction_mctct import MCTCTFeatureExtractor
		from .processing_mctct import MCTCTProcessor

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_mctct import MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST, MCTCTForCTC, MCTCTModel, MCTCTPreTrainedModel

else:
		import sys

		lowerCamelCase__	=							_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)



