




import pytest

import datasets


# Import fixture modules as plugins
lowerCAmelCase_					    = ["""tests.fixtures.files""", """tests.fixtures.hub""", """tests.fixtures.fsspec"""]



def      __lowerCAmelCase			(					UpperCamelCase	,      UpperCamelCase      )     ->	Union[str, Any]:
  # 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      __lowerCAmelCase			(					UpperCamelCase      )     ->	List[Any]:
  config.addinivalue_line('''markers'''	,      '''torchaudio_latest: mark test to run with torchaudio>=0.12'''      )



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



@pytest.fixture(autouse=UpperCamelCase	,      scope='''session'''      )
def      __lowerCAmelCase			(					)     ->	Optional[Any]:
  datasets.disable_progress_bar()



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



@pytest.fixture
def      __lowerCAmelCase			(					UpperCamelCase      )     ->	Tuple:
  # 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'''	,      UpperCamelCase      )







lowerCAmelCase_					    = 6_55_21



def      __lowerCAmelCase			(					UpperCamelCase      )     ->	int:
  lowerCAmelCase__				:  List[str]		       =     1
  lowerCAmelCase__				:  List[Any]		       =     0
  for plain_chr in plain_text:
    lowerCAmelCase__				:  Union[str, Any]		       =     (a + ord(UpperCamelCase      )) % MOD_ADLER
    lowerCAmelCase__				:  Optional[Any]		       =     (b + a) % MOD_ADLER
  return (b << 16) | a

