



import pytest
import requests

from datasets.utils.file_utils import http_head

from .utils import OfflineSimulationMode, RequestWouldHangIndefinitelyError, offline




@pytest.mark.integration
def     UpperCamelCase						(	):
		'''simple docstring'''




		with offline(OfflineSimulationMode.CONNECTION_TIMES_OUT     ):
				with pytest.raises(__lowercase     ):
						requests.request('GET'						,'https://huggingface.co'     )
				with pytest.raises(requests.exceptions.ConnectTimeout     ):
						requests.request('GET'						,'https://huggingface.co'						,timeout=1.0     )




@pytest.mark.integration
def     UpperCamelCase						(	):
		'''simple docstring'''




		with offline(OfflineSimulationMode.CONNECTION_FAILS     ):
				with pytest.raises(requests.exceptions.ConnectionError     ):
						requests.request('GET'						,'https://huggingface.co'     )




def     UpperCamelCase						(	):
		'''simple docstring'''




		with offline(OfflineSimulationMode.HF_DATASETS_OFFLINE_SET_TO_1     ):
				with pytest.raises(__lowercase     ):
						http_head('https://huggingface.co'     )







from ..utils import DummyObject, requires_backends





class UpperCAmelCase						( metaclass=__A  ):


				'''simple docstring'''






				lowerCamelCase_    = ['''onnx''']
				def __init__(						self		,     *lowercase		,     **lowercase ):



						"""simple docstring"""





						requires_backends(self		,     ['onnx'] )
				@classmethod
				def   lowerCAmelCase_       (						cls		,     *lowercase		,     **lowercase ):



						"""simple docstring"""





						requires_backends(cls		,     ['onnx'] )







				@classmethod
				def   lowerCAmelCase_       (						cls		,     *lowercase		,     **lowercase ):



						"""simple docstring"""





						requires_backends(cls		,     ['onnx'] )






