



import unittest
from dataclasses import dataclass
from typing import Optional

from transformers.utils import ModelOutput



@dataclass
class 		_lowercase		(							UpperCAmelCase__						):
   _UpperCAmelCase  						=      42
   _UpperCAmelCase  						=      None
   _UpperCAmelCase  						=      None



class 		_lowercase		(							unittest.TestCase						):

   def 		A				(   self      :							Any				)							->					Dict:


    """simple docstring"""






    a							=		ModelOutputTest(a=30				)
    self.assertEqual(x.a				, 30				)
    self.assertIsNone(x.b				)
    self.assertIsNone(x.c				)
    with self.assertRaises(__lowerCAmelCase				):
     a							=		x.d

   def 		A				(   self      :							int				)							->					int:


    """simple docstring"""






    a							=		ModelOutputTest(a=30				, b=10				)
    self.assertEqual(x[0]				, 30				)
    self.assertEqual(x[1]				, 10				)
    self.assertEqual(x[:2]				, (30, 10)				)
    self.assertEqual(x[:]				, (30, 10)				)

    a							=		ModelOutputTest(a=30				, c=10				)
    self.assertEqual(x[0]				, 30				)
    self.assertEqual(x[1]				, 10				)
    self.assertEqual(x[:2]				, (30, 10)				)
    self.assertEqual(x[:]				, (30, 10)				)

   def 		A				(   self      :							int				)							->					List[Any]:


    """simple docstring"""






    a							=		ModelOutputTest(a=30				, b=10				)
    self.assertEqual(x["a"]				, 30				)
    self.assertEqual(x["b"]				, 10				)
    with self.assertRaises(__lowerCAmelCase				):
     a							=		x["c"]

    a							=		ModelOutputTest(a=30				, c=10				)
    self.assertEqual(x["a"]				, 30				)
    self.assertEqual(x["c"]				, 10				)
    with self.assertRaises(__lowerCAmelCase				):
     a							=		x["b"]

   def 		A				(   self      :							Optional[int]				)							->					List[Any]:


    """simple docstring"""






    a							=		ModelOutputTest(a=30				)
    self.assertEqual(list(x.keys()				)				, ["a"]				)
    self.assertEqual(list(x.values()				)				, [30]				)
    self.assertEqual(list(x.items()				)				, [("a", 30)]				)
    self.assertEqual(list(__lowerCAmelCase				)				, ["a"]				)

    a							=		ModelOutputTest(a=30				, b=10				)
    self.assertEqual(list(x.keys()				)				, ["a", "b"]				)
    self.assertEqual(list(x.values()				)				, [30, 10]				)
    self.assertEqual(list(x.items()				)				, [("a", 30), ("b", 10)]				)
    self.assertEqual(list(__lowerCAmelCase				)				, ["a", "b"]				)

    a							=		ModelOutputTest(a=30				, c=10				)
    self.assertEqual(list(x.keys()				)				, ["a", "c"]				)
    self.assertEqual(list(x.values()				)				, [30, 10]				)
    self.assertEqual(list(x.items()				)				, [("a", 30), ("c", 10)]				)
    self.assertEqual(list(__lowerCAmelCase				)				, ["a", "c"]				)

    with self.assertRaises(__lowerCAmelCase				):
     a							=		x.update({"d": 20}				)
    with self.assertRaises(__lowerCAmelCase				):
     del x["a"]
    with self.assertRaises(__lowerCAmelCase				):
     a							=		x.pop("a"				)
    with self.assertRaises(__lowerCAmelCase				):
     a							=		x.setdefault("d"				, 32				)

   def 		A				(   self      :							Dict				)							->					List[str]:


    """simple docstring"""






    a							=		ModelOutputTest(a=30				)
    a							=		10
    self.assertEqual(x.a				, 10				)
    self.assertEqual(x["a"]				, 10				)

   def 		A				(   self      :							List[Any]				)							->					List[str]:


    """simple docstring"""






    a							=		ModelOutputTest(a=30				)
    a							=		10
    self.assertEqual(x.a				, 10				)
    self.assertEqual(x["a"]				, 10				)

   def 		A				(   self      :							Any				)							->					Tuple:


    """simple docstring"""






    a							=		ModelOutputTest({"a": 30, "b": 10}				)
    self.assertEqual(list(x.keys()				)				, ["a", "b"]				)
    self.assertEqual(x.a				, 30				)
    self.assertEqual(x.b				, 10				)




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


    """simple docstring"""






    a							=		ModelOutputTest([("a", 30), ("b", 10)]				)
    self.assertEqual(list(x.keys()				)				, ["a", "b"]				)
    self.assertEqual(x.a				, 30				)
    self.assertEqual(x.b				, 10				)

    with self.assertRaises(__lowerCAmelCase				):
     a							=		ModelOutputTest([("a", 30), (10, 10)]				)

    a							=		ModelOutputTest(a=(30, 30)				)
    self.assertEqual(list(x.keys()				)				, ["a"]				)
    self.assertEqual(x.a				, (30, 30)				)



'''simple docstring'''





from .pipeline_kandinskya_a import KandinskyVaaPipeline
from .pipeline_kandinsky2_2_controlnet import KandinskyVaaControlnetPipeline
from .pipeline_kandinsky2_2_controlnet_img2img import KandinskyVaaControlnetImgaImgPipeline
from .pipeline_kandinsky2_2_img2img import KandinskyVaaImgaImgPipeline
from .pipeline_kandinsky2_2_inpainting import KandinskyVaaInpaintPipeline
from .pipeline_kandinsky2_2_prior import KandinskyVaaPriorPipeline
from .pipeline_kandinsky2_2_prior_emb2emb import KandinskyVaaPriorEmbaEmbPipeline

