11import pytest
22
3- from hvpy import DataSources
3+ from hvpy import DataSource
44from hvpy .utils import _create_layer_string , _to_datasource , create_layers
55
66
77def test_create_layers ():
88 assert create_layers ([(9 , 100 ), (11 , 50 )]) == "[9,1,100],[11,1,50]"
99
10- with pytest .raises (ValueError , match = "999 is not a valid DataSources " ):
10+ with pytest .raises (ValueError , match = "999 is not a valid DataSource " ):
1111 create_layers ([(9 , 100 ), (999 , 100 )])
1212
1313 with pytest .raises (ValueError , match = "must be between 0 and 100" ):
@@ -18,15 +18,15 @@ def test_create_layers():
1818
1919
2020def test_to_datasource ():
21- assert _to_datasource (9 ) == DataSources .AIA_131
22- assert _to_datasource (DataSources .AIA_94 ) == DataSources .AIA_94
23- with pytest .raises (ValueError , match = "999 is not a valid DataSources " ):
21+ assert _to_datasource (9 ) == DataSource .AIA_131
22+ assert _to_datasource (DataSource .AIA_94 ) == DataSource .AIA_94
23+ with pytest .raises (ValueError , match = "999 is not a valid DataSource " ):
2424 _to_datasource (999 )
2525
2626
2727def test_create_layers_string ():
28- assert _create_layer_string (DataSources .AIA_131 , 100 ) == "[9,1,100]"
28+ assert _create_layer_string (DataSource .AIA_131 , 100 ) == "[9,1,100]"
2929 with pytest .raises (ValueError , match = "must be between 0 and 100" ):
30- _create_layer_string (DataSources .AIA_131 , 101 )
30+ _create_layer_string (DataSource .AIA_131 , 101 )
3131 with pytest .raises (ValueError , match = "must be between 0 and 100" ):
32- _create_layer_string (DataSources .AIA_131 , - 1 )
32+ _create_layer_string (DataSource .AIA_131 , - 1 )
0 commit comments