
import unittest
from pathlib import Path
from tempfile import TemporaryDirectory
from unittest.mock import Mock, patch

import diffusers.utils.hub_utils







class 							UpperCAmelCase	(   unittest.TestCase					):

					@patch('''diffusers.utils.hub_utils.get_full_repo_name'''					)
					def        _lowerCAmelCase	(			self      :					Optional[int] ,      lowerCAmelCase      :					Mock					):
											lowercase       :    Tuple											=  '''full_repo_name'''
											with TemporaryDirectory() as tmpdir:
																	# Dummy args values
																	lowercase       :    Optional[Any]											=  Mock()
																	lowercase       :    Optional[Any]											=  tmpdir
																	lowercase       :    Optional[int]											=  0
																	lowercase       :    Optional[Any]											=  '''hub_token'''
																	lowercase       :    Union[str, Any]											=  '''dataset_name'''
																	lowercase       :    Union[str, Any]											=  0.01
																	lowercase       :    Optional[Any]											=  10_0000
																	lowercase       :    List[str]											=  1_0000
																	lowercase       :    int											=  0.01
																	lowercase       :    Tuple											=  0.02
																	lowercase       :    Union[str, Any]											=  0.03
																	lowercase       :    Union[str, Any]											=  0.00_05
																	lowercase       :    int											=  0.00_00_01
																	lowercase       :    Any											=  1
																	lowercase       :    List[str]											=  10
																	lowercase       :    str											=  0.0_01
																	lowercase       :    Dict											=  0.1
																	lowercase       :    Tuple											=  0.2
																	lowercase       :    Optional[Any]											=  True

																	# Model card mush be rendered and saved
																	diffusers.utils.hub_utils.create_model_card(lowerCAmelCase ,      model_name='''model_name'''					)
																	self.assertTrue((Path(lowerCAmelCase					) / '''README.md''').is_file()					)







snake_case__  							=							"""
# Diffusers installation
! pip install diffusers transformers datasets accelerate
# To install from source instead of the last release, comment the command above and uncomment the following one.
# ! pip install git+https://github.com/huggingface/diffusers.git
"""

snake_case__  							=							[{"""type""": """code""", """content""": INSTALL_CONTENT}]


