






import pytest

import datasets


# Import fixture modules as plugins
__a:     Optional[Any]   					=					['''tests.fixtures.files''', '''tests.fixtures.hub''', '''tests.fixtures.fsspec''']




def       _SCREAMING_SNAKE_CASE (							__snake_case   ,      __snake_case )				->						str:
       # Mark tests as "unit" by default if not marked as "integration" (or already marked as "unit")
       for item in items:
              if any(marker in item.keywords for marker in ["""integration""", """unit"""] ):
                     continue
              item.add_marker(pytest.mark.unit )




def       _SCREAMING_SNAKE_CASE (							__snake_case )				->						Optional[Any]:
       config.addinivalue_line("""markers"""   ,      """torchaudio_latest: mark test to run with torchaudio>=0.12""" )




@pytest.fixture(autouse=__snake_case )
def       _SCREAMING_SNAKE_CASE (							__snake_case   ,      __snake_case )				->						Optional[Any]:
       # test_hf_cache_home = tmp_path_factory.mktemp("cache")  # TODO: why a cache dir per test function does not work?
       _UpperCAmelCase							=    tmp_path_factory.getbasetemp() / """cache"""
       _UpperCAmelCase							=    test_hf_cache_home / """datasets"""
       _UpperCAmelCase							=    test_hf_cache_home / """metrics"""
       _UpperCAmelCase							=    test_hf_cache_home / """modules"""
       monkeypatch.setattr("""datasets.config.HF_DATASETS_CACHE"""   ,      str(__snake_case ) )
       monkeypatch.setattr("""datasets.config.HF_METRICS_CACHE"""   ,      str(__snake_case ) )
       monkeypatch.setattr("""datasets.config.HF_MODULES_CACHE"""   ,      str(__snake_case ) )
       _UpperCAmelCase							=    test_hf_datasets_cache / """downloads"""
       monkeypatch.setattr("""datasets.config.DOWNLOADED_DATASETS_PATH"""   ,      str(__snake_case ) )
       _UpperCAmelCase							=    test_hf_datasets_cache / """downloads""" / """extracted"""
       monkeypatch.setattr("""datasets.config.EXTRACTED_DATASETS_PATH"""   ,      str(__snake_case ) )




@pytest.fixture(autouse=__snake_case   ,      scope="""session""" )
def       _SCREAMING_SNAKE_CASE (							)				->						int:
       datasets.disable_progress_bar()




@pytest.fixture(autouse=__snake_case )
def       _SCREAMING_SNAKE_CASE (							__snake_case )				->						Optional[Any]:
       # don't take tests into account when counting downloads
       monkeypatch.setattr("""datasets.config.HF_UPDATE_DOWNLOAD_COUNTS"""   ,      __snake_case )





@pytest.fixture
def       _SCREAMING_SNAKE_CASE (							__snake_case )				->						List[Any]:
       # Required to suppress RemovedIn20Warning when feature(s) are not compatible with SQLAlchemy 2.0
       # To be removed once SQLAlchemy 2.0 supported
       monkeypatch.setattr("""sqlalchemy.util.deprecations.SILENCE_UBER_WARNING"""   ,      __snake_case )







__a:     List[Any]   					=					{
    '''Pillow''': '''Pillow''',
    '''accelerate''': '''accelerate>=0.11.0''',
    '''compel''': '''compel==0.1.8''',
    '''black''': '''black~=23.1''',
    '''datasets''': '''datasets''',
    '''filelock''': '''filelock''',
    '''flax''': '''flax>=0.4.1''',
    '''hf-doc-builder''': '''hf-doc-builder>=0.3.0''',
    '''huggingface-hub''': '''huggingface-hub>=0.13.2''',
    '''requests-mock''': '''requests-mock==1.10.0''',
    '''importlib_metadata''': '''importlib_metadata''',
    '''invisible-watermark''': '''invisible-watermark''',
    '''isort''': '''isort>=5.5.4''',
    '''jax''': '''jax>=0.2.8,!=0.3.2''',
    '''jaxlib''': '''jaxlib>=0.1.65''',
    '''Jinja2''': '''Jinja2''',
    '''k-diffusion''': '''k-diffusion>=0.0.12''',
    '''torchsde''': '''torchsde''',
    '''note_seq''': '''note_seq''',
    '''librosa''': '''librosa''',
    '''numpy''': '''numpy''',
    '''omegaconf''': '''omegaconf''',
    '''parameterized''': '''parameterized''',
    '''protobuf''': '''protobuf>=3.20.3,<4''',
    '''pytest''': '''pytest''',
    '''pytest-timeout''': '''pytest-timeout''',
    '''pytest-xdist''': '''pytest-xdist''',
    '''ruff''': '''ruff>=0.0.241''',
    '''safetensors''': '''safetensors''',
    '''sentencepiece''': '''sentencepiece>=0.1.91,!=0.1.92''',
    '''scipy''': '''scipy''',
    '''onnx''': '''onnx''',
    '''regex''': '''regex!=2019.12.17''',
    '''requests''': '''requests''',
    '''tensorboard''': '''tensorboard''',
    '''torch''': '''torch>=1.4''',
    '''torchvision''': '''torchvision''',
    '''transformers''': '''transformers>=4.25.1''',
    '''urllib3''': '''urllib3<=2.0.0''',
}