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

import diffusers.utils.hub_utils





class 						lowercase       (  unittest.TestCase					):
					@patch('''diffusers.utils.hub_utils.get_full_repo_name'''    )
					def lowercase_			(		self ,	SCREAMING_SNAKE_CASE__    ):
								"""simple docstring"""







								lowerCAmelCase__ :    str				      =			'''full_repo_name'''
								with TemporaryDirectory() as tmpdir:
											# Dummy args values
											lowerCAmelCase__ :    Optional[int]				      =			Mock()
											lowerCAmelCase__ :    Optional[int]				      =			tmpdir
											lowerCAmelCase__ :    Optional[Any]				      =			0
											lowerCAmelCase__ :    Optional[int]				      =			'''hub_token'''
											lowerCAmelCase__ :    Tuple				      =			'''dataset_name'''
											lowerCAmelCase__ :    int				      =			0.01
											lowerCAmelCase__ :    Optional[int]				      =			100000
											lowerCAmelCase__ :    Any				      =			10000
											lowerCAmelCase__ :    Union[str, Any]				      =			0.01
											lowerCAmelCase__ :    int				      =			0.02
											lowerCAmelCase__ :    Union[str, Any]				      =			0.03
											lowerCAmelCase__ :    str				      =			0.0_005
											lowerCAmelCase__ :    Dict				      =			0.000_001
											lowerCAmelCase__ :    Tuple				      =			1
											lowerCAmelCase__ :    Optional[int]				      =			10
											lowerCAmelCase__ :    int				      =			0.001
											lowerCAmelCase__ :    Union[str, Any]				      =			0.1
											lowerCAmelCase__ :    Tuple				      =			0.2
											lowerCAmelCase__ :    Optional[int]				      =			True

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





# tests directory-specific settings - this file is run automatically
# by pytest before any tests are run

import sys
import warnings
from os.path import abspath, dirname, join


# allow having multiple repository checkouts and not needing to remember to rerun
# 'pip install -e .[dev]' when switching between checkouts and running tests.
A__       :   Optional[Any]   						=					abspath(join(dirname(dirname(dirname(__file__))), """src"""))
sys.path.insert(1, git_repo_path)


# silence FutureWarning warnings in tests since often we can't act on them until
# they become normal warnings - i.e. the tests still need to test the current functionality
warnings.simplefilter(action="""ignore""", category=FutureWarning)



def      _a     (   __UpperCamelCase       :  Tuple    ):
			from transformers.testing_utils import pytest_addoption_shared

			pytest_addoption_shared(__UpperCamelCase    )



def      _a     (   __UpperCamelCase       :  int    ):
			from transformers.testing_utils import pytest_terminal_summary_main

			lowerCAmelCase__ :    int				      =			terminalreporter.config.getoption('''--make-reports'''    )
			if make_reports:
						pytest_terminal_summary_main(__UpperCamelCase	,id=__UpperCamelCase    )



