import unittest

from knapsack import greedy_knapsack as kp
class SCREAMING_SNAKE_CASE_		(      unittest.TestCase		):







   def 						lowerCamelCase_	(     self						:						Any				):





    """simple docstring"""


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







   def 						lowerCamelCase_	(     self						:						List[Any]				):





    """simple docstring"""


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







   def 						lowerCamelCase_	(     self						:						List[Any]				):





    """simple docstring"""


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







   def 						lowerCamelCase_	(     self						:						List[Any]				):





    """simple docstring"""


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







   def 						lowerCamelCase_	(     self						:						Optional[Any]				):





    """simple docstring"""


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







   def 						lowerCamelCase_	(     self						:						List[str]				):





    """simple docstring"""


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


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

import unittest

from diffusers import FlaxAutoencoderKL
from diffusers.utils import is_flax_available
from diffusers.utils.testing_utils import require_flax

from .test_modeling_common_flax import FlaxModelTesterMixin


if is_flax_available():
     import jax
@require_flax
class SCREAMING_SNAKE_CASE_		(      __lowerCAmelCase  ,     unittest.TestCase		):
   __lowerCAmelCase           =				FlaxAutoencoderKL







   @property
   def 						lowerCamelCase_	(     self						:						Tuple				):





    """simple docstring"""


    UpperCamelCase			  =      4
    UpperCamelCase			  =      3
    UpperCamelCase			  =      (32, 32)

    UpperCamelCase			  =      jax.random.PRNGKey(0				)
    UpperCamelCase			  =      jax.random.uniform(lowerCamelCase_   ,   ((batch_size, num_channels) + sizes)				)

    return {"sample": image, "prng_key": prng_key}







   def 						lowerCamelCase_	(     self						:						str				):





    """simple docstring"""


    UpperCamelCase			  =      {
        """block_out_channels""": [32, 64],
        """in_channels""": 3,
        """out_channels""": 3,
        """down_block_types""": ["""DownEncoderBlock2D""", """DownEncoderBlock2D"""],
        """up_block_types""": ["""UpDecoderBlock2D""", """UpDecoderBlock2D"""],
        """latent_channels""": 4,
    }
    UpperCamelCase			  =      self.dummy_input
    return init_dict, inputs_dict
