
import unittest

from transformers import is_torch_available, load_tool

from .test_tools_common import ToolTesterMixin


if is_torch_available():
   import torch






class UpperCAmelCase     (		unittest.TestCase							,							SCREAMING_SNAKE_CASE__     ):





   '''simple docstring'''


   def 				__magic_name__       (      self  :							int  ):

      """simple docstring"""
      _A:						Dict	    = load_tool('''speech-to-text'''  )
      self.tool.setup()


   def 				__magic_name__       (      self  :							Union[str, Any]  ):

      """simple docstring"""
      _A:						Optional[int]	    = self.tool(torch.ones(3_0_0_0  )  )
      self.assertEqual(lowerCAmelCase_    ,    ''' you'''  )


   def 				__magic_name__       (      self  :							str  ):

      """simple docstring"""
      _A:						Tuple	    = self.tool(audio=torch.ones(3_0_0_0  )  )
      self.assertEqual(lowerCAmelCase_    ,    ''' you'''  )





import pytest

from datasets.utils.version import Version






@pytest.mark.parametrize(
    '''other, expected_equality'''	,	[
        (Version('''1.0.0'''   ), True),
        ('''1.0.0''', True),
        (Version('''2.0.0'''   ), False),
        ('''2.0.0''', False),
        ('''1''', False),
        ('''a''', False),
        (1, False),
        (None, False),
    ]	,	)
def 						lowerCamelCase__							(      a	,	a   )   ->     str:
   _A:						Tuple	    = Version('''1.0.0'''   )
   assert (version == other) is expected_equality
   assert (version != other) is not expected_equality
   assert (hash(a   ) == hash(a   )) is expected_equality



