#NEWLINE# @ recorder . use_cassette ( 'tds5_basic' ) #NEWLINE# def test_tds5_basic( ) : #NEWLINE# #INDENT# 'Test basic handling of getting data from TDS 5' #NEWLINE# ds = Dataset ( 'http://localhost:8080/thredds/cdmremote/nc4/tst/nc4_sfc_pres_temp.nc' ) #NEWLINE# temp = ds . variables [ 'temperature' ] #NEWLINE# temp_data = temp [ : ] #NEWLINE# assert ( temp_data . shape == ( 6 , 12 ) ) #NEWLINE# assert_almost_equal ( temp_data [ ( 0 , 0 ) ] , 9.0 ) #NEWLINE# temp_sub = temp [ : 2 , : 2 ] #NEWLINE# assert ( temp_sub . shape == ( 2 , 2 ) ) #NEWLINE# assert_array_almost_equal ( temp_sub , np . array ( [ [ 9.0 , 10.5 ] , [ 9.25 , 10.75 ] ] , dtype = np . float32 ) )