


import os
import tempfile
import unittest

from transformers.models.marian.convert_marian_tatoeba_to_pytorch import DEFAULT_REPO, TatoebaConverter
from transformers.testing_utils import slow
from transformers.utils import cached_property







@unittest.skipUnless(os.path.exists(UpperCAmelCase      )					,	'Tatoeba directory does not exist.'      )
class        lowerCamelCase__	(							unittest.TestCase      ):






			"""simple docstring"""






			@cached_property
			def 				snake_case__				(							self     ):

						'''simple docstring'''


						UpperCamelCase__					=       tempfile.mkdtemp()
						return TatoebaConverter(save_dir=snake_case     )




			@slow
			def 				snake_case__				(							self     ):

						'''simple docstring'''


						self.resolver.convert_models(["heb-eng"]     )







			@slow
			def 				snake_case__				(							self     ):

						'''simple docstring'''


						UpperCamelCase__,      UpperCamelCase__					=       self.resolver.write_model_card("opus-mt-he-en"      ,						dry_run=snake_case     )
						assert mmeta["long_pair"] == "heb-eng"






import os
import tempfile
import unittest

from transformers.models.marian.convert_marian_tatoeba_to_pytorch import DEFAULT_REPO, TatoebaConverter
from transformers.testing_utils import slow
from transformers.utils import cached_property







@unittest.skipUnless(os.path.exists(UpperCAmelCase      )					,	'Tatoeba directory does not exist.'      )
class        lowerCamelCase__	(							unittest.TestCase      ):






			"""simple docstring"""






			@cached_property
			def 				snake_case__				(							self     ):

						'''simple docstring'''


						UpperCamelCase__					=       tempfile.mkdtemp()
						return TatoebaConverter(save_dir=snake_case     )




			@slow
			def 				snake_case__				(							self     ):

						'''simple docstring'''


						self.resolver.convert_models(["heb-eng"]     )







			@slow
			def 				snake_case__				(							self     ):

						'''simple docstring'''


						UpperCamelCase__,      UpperCamelCase__					=       self.resolver.write_model_card("opus-mt-he-en"      ,						dry_run=snake_case     )
						assert mmeta["long_pair"] == "heb-eng"


