Commit 2fd00f0 1 parent 3f9d619 commit 2fd00f0 Copy full SHA for 2fd00f0
File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 5
5
from activestorage .active import load_from_https
6
6
7
7
8
+ def test_https ():
9
+ """Run a true test with a https FILE."""
10
+ test_file_uri = "https://esgf.ceda.ac.uk/thredds/fileServer/esg_cmip6/CMIP6/AerChemMIP/MOHC/UKESM1-0-LL/ssp370SST-lowNTCF/r1i1p1f2/Amon/cl/gn/latest/cl_Amon_UKESM1-0-LL_ssp370SST-lowNTCF_r1i1p1f2_gn_205001-209912.nc"
11
+
12
+ active = Active (test_file_uri , "cl" , storage_type = "https" )
13
+ active ._version = 2
14
+ active ._method = "min"
15
+ result = active [0 :3 , 4 :6 , 7 :9 ]
16
+ print ("Result is" , result )
17
+ assert result == np .array ([0.6909787 ], dtype = "float32" )
18
+
19
+
8
20
def test_https_dataset ():
9
- """Run a true test with a https dataset ."""
21
+ """Run a true test with a https DATASET ."""
10
22
test_file_uri = "https://esgf.ceda.ac.uk/thredds/fileServer/esg_cmip6/CMIP6/AerChemMIP/MOHC/UKESM1-0-LL/ssp370SST-lowNTCF/r1i1p1f2/Amon/cl/gn/latest/cl_Amon_UKESM1-0-LL_ssp370SST-lowNTCF_r1i1p1f2_gn_205001-209912.nc"
11
23
dataset = load_from_https (test_file_uri )
12
24
av = dataset ['cl' ]
You can’t perform that action at this time.
0 commit comments