File tree Expand file tree Collapse file tree 2 files changed +14
-16
lines changed
Expand file tree Collapse file tree 2 files changed +14
-16
lines changed Original file line number Diff line number Diff line change @@ -69,14 +69,13 @@ def test_krige_classification_housing():
6969
7070 try :
7171 housing = fetch_california_housing ()
72- except (ssl .SSLError , urllib .error .URLError ):
73- ssl ._create_default_https_context = ssl ._create_unverified_context
74- try :
75- housing = fetch_california_housing ()
76- except PermissionError :
77- # This can raise permission error on Appveyor
78- pytest .skip ("Failed to load california housing dataset" )
79- ssl ._create_default_https_context = ssl .create_default_context
72+ except (
73+ ssl .SSLError ,
74+ urllib .error .URLError ,
75+ urllib .error .HTTPError ,
76+ PermissionError ,
77+ ):
78+ pytest .skip ("Failed to load california housing dataset" )
8079
8180 # take only first 1000
8281 p = housing ["data" ][:1000 , :- 2 ]
Original file line number Diff line number Diff line change @@ -69,14 +69,13 @@ def test_krige_housing():
6969
7070 try :
7171 housing = fetch_california_housing ()
72- except (ssl .SSLError , urllib .error .URLError ):
73- ssl ._create_default_https_context = ssl ._create_unverified_context
74- try :
75- housing = fetch_california_housing ()
76- except PermissionError :
77- # This can raise permission error on Appveyor
78- pytest .skip ("Failed to load california housing dataset" )
79- ssl ._create_default_https_context = ssl .create_default_context
72+ except (
73+ ssl .SSLError ,
74+ urllib .error .URLError ,
75+ urllib .error .HTTPError ,
76+ PermissionError ,
77+ ):
78+ pytest .skip ("Failed to load california housing dataset" )
8079
8180 # take only first 1000
8281 p = housing ["data" ][:1000 , :- 2 ]
You can’t perform that action at this time.
0 commit comments