@@ -19,51 +19,51 @@ class TestProbabilityTiles:
1919
2020 def test_empty (self ):
2121 with pytest .raises (InvalidArgument ):
22- fs .tile .get_probability_depth (year = 2050 , return_period = 5 , coordinate = [])
22+ fs .tile .get_probability_depth (year = 2050 , return_period = 5 , search_items = [])
2323
2424 def test_wrong_coord_type (self ):
2525 with pytest .raises (InvalidArgument ):
26- fs .tile .get_probability_depth (year = 2050 , return_period = 5 , coordinate = (12 , 942 , 1715 ))
26+ fs .tile .get_probability_depth (year = 2050 , return_period = 5 , search_items = (12 , 942 , 1715 ))
2727
2828 def test_wrong_coord_tuple_type (self ):
2929 with pytest .raises (TypeError ):
30- fs .tile .get_probability_depth (year = 2050 , return_period = 500 , coordinate = [500 ])
30+ fs .tile .get_probability_depth (year = 2050 , return_period = 500 , search_items = [500 ])
3131
3232 def test_invalid (self ):
3333 coord = [(1 , 1 , 1 )]
34- tile = fs .tile .get_probability_depth (year = 2050 , return_period = 5 , coordinate = coord )
34+ tile = fs .tile .get_probability_depth (year = 2050 , return_period = 5 , search_items = coord )
3535 assert len (tile ) == 1
3636 assert tile [0 ].coordinate == coord [0 ]
3737 assert tile [0 ].image is None
3838 assert tile [0 ].valid_id is False
3939
4040 def test_wrong_year_type (self ):
4141 with pytest .raises (TypeError ):
42- fs .tile .get_probability_depth (year = "year" , return_period = 5 , coordinate = [(12 , 942 , 1715 )])
42+ fs .tile .get_probability_depth (year = "year" , return_period = 5 , search_items = [(12 , 942 , 1715 )])
4343
4444 def test_wrong_return_period_type (self ):
4545 with pytest .raises (TypeError ):
46- fs .tile .get_probability_depth (year = 2050 , return_period = "rp" , coordinate = [(12 , 942 , 1715 )])
46+ fs .tile .get_probability_depth (year = 2050 , return_period = "rp" , search_items = [(12 , 942 , 1715 )])
4747
4848 def test_bad_year (self ):
4949 with pytest .raises (InvalidArgument ):
50- fs .tile .get_probability_depth (year = 1000 , return_period = 5 , coordinate = [(12 , 942 , 1715 )])
50+ fs .tile .get_probability_depth (year = 1000 , return_period = 5 , search_items = [(12 , 942 , 1715 )])
5151
5252 def test_bad_return_period (self ):
5353 with pytest .raises (InvalidArgument ):
54- fs .tile .get_probability_depth (year = 1000 , return_period = 5 , coordinate = [(12 , 942 , 1715 )])
54+ fs .tile .get_probability_depth (year = 1000 , return_period = 5 , search_items = [(12 , 942 , 1715 )])
5555
5656 def test_single (self ):
5757 coord = [(12 , 942 , 1715 )]
58- tile = fs .tile .get_probability_depth (year = 2050 , return_period = 5 , coordinate = coord )
58+ tile = fs .tile .get_probability_depth (year = 2050 , return_period = 5 , search_items = coord )
5959 assert len (tile ) == 1
6060 assert tile [0 ].coordinate == coord [0 ]
6161 assert tile [0 ].image is not None
6262 assert tile [0 ].valid_id is True
6363
6464 def test_multiple (self ):
6565 coord = [(12 , 942 , 1715 ), (17 , 30990 , 54379 )]
66- tile = fs .tile .get_probability_depth (year = 2050 , return_period = 5 , coordinate = coord )
66+ tile = fs .tile .get_probability_depth (year = 2050 , return_period = 5 , search_items = coord )
6767 assert len (tile ) == 2
6868 tile .sort (key = lambda x : x .coordinate )
6969 assert tile [0 ].coordinate == coord [0 ]
@@ -75,15 +75,15 @@ def test_multiple(self):
7575
7676 def test_single_image (self ):
7777 coord = [(12 , 942 , 1715 )]
78- tile = fs .tile .get_probability_depth (year = 2050 , return_period = 5 , coordinate = coord , image = True )
78+ tile = fs .tile .get_probability_depth (year = 2050 , return_period = 5 , search_items = coord , image = True )
7979 assert len (tile ) == 1
8080 assert tile [0 ].coordinate == coord [0 ]
8181 assert tile [0 ].image is not None
8282 assert tile [0 ].valid_id is True
8383
8484 def test_mixed_invalid (self ):
8585 coord = [(12 , 942 , 1715 ), (1 , 1 , 1 )]
86- tile = fs .tile .get_probability_depth (year = 2050 , return_period = 5 , coordinate = coord )
86+ tile = fs .tile .get_probability_depth (year = 2050 , return_period = 5 , search_items = coord )
8787 assert len (tile ) == 2
8888 tile .sort (key = lambda x : x .coordinate , reverse = True )
8989 assert tile [0 ].coordinate == coord [0 ]
@@ -94,7 +94,7 @@ def test_mixed_invalid(self):
9494 assert tile [1 ].valid_id is False
9595
9696 def test_one_of_each (self ):
97- tile = fs .tile .get_probability_depth (year = 2050 , return_period = 5 , coordinate = [(12 , 942 , 1715 )])
97+ tile = fs .tile .get_probability_depth (year = 2050 , return_period = 5 , search_items = [(12 , 942 , 1715 )])
9898 assert len (tile ) == 1
9999 assert tile [0 ].valid_id is True
100100 assert tile [0 ].coordinate == (12 , 942 , 1715 )
@@ -107,41 +107,41 @@ class TestHistoricTiles:
107107
108108 def test_empty (self ):
109109 with pytest .raises (InvalidArgument ):
110- fs .tile .get_historic_event (event_id = 2 , coordinate = [])
110+ fs .tile .get_historic_event (event_id = 2 , search_items = [])
111111
112112 def test_wrong_coord_type (self ):
113113 with pytest .raises (InvalidArgument ):
114- fs .tile .get_historic_event (event_id = 2 , coordinate = (12 , 942 , 1715 ))
114+ fs .tile .get_historic_event (event_id = 2 , search_items = (12 , 942 , 1715 ))
115115
116116 def test_invalid (self ):
117117 coord = [(12 , 1 , 1 )]
118- tile = fs .tile .get_historic_event (event_id = 2 , coordinate = coord )
118+ tile = fs .tile .get_historic_event (event_id = 2 , search_items = coord )
119119 assert len (tile ) == 1
120120 assert tile [0 ].coordinate == coord [0 ]
121121 # No way to test if image is bad
122122
123123 def test_wrong_event_id_type (self ):
124124 with pytest .raises (TypeError ):
125- fs .tile .get_historic_event (event_id = "event_id" , coordinate = [(12 , 942 , 1715 )])
125+ fs .tile .get_historic_event (event_id = "event_id" , search_items = [(12 , 942 , 1715 )])
126126
127127 def test_bad_event (self ):
128128 coord = [(12 , 942 , 1715 )]
129- tile = fs .tile .get_historic_event (event_id = 99999 , coordinate = coord )
129+ tile = fs .tile .get_historic_event (event_id = 99999 , search_items = coord )
130130 assert len (tile ) == 1
131131 assert tile [0 ].coordinate == coord [0 ]
132132 # No way to test if image is bad
133133
134134 def test_single (self ):
135135 coord = [(12 , 942 , 1715 )]
136- tile = fs .tile .get_historic_event (event_id = 2 , coordinate = coord )
136+ tile = fs .tile .get_historic_event (event_id = 2 , search_items = coord )
137137 assert len (tile ) == 1
138138 assert tile [0 ].coordinate == coord [0 ]
139139 assert tile [0 ].image is not None
140140 assert tile [0 ].valid_id is True
141141
142142 def test_multiple (self ):
143143 coord = [(12 , 942 , 1715 ), (17 , 30990 , 54379 )]
144- tile = fs .tile .get_historic_event (event_id = 2 , coordinate = coord )
144+ tile = fs .tile .get_historic_event (event_id = 2 , search_items = coord )
145145 assert len (tile ) == 2
146146 tile .sort (key = lambda x : x .coordinate )
147147 assert tile [0 ].coordinate == coord [0 ]
@@ -153,15 +153,15 @@ def test_multiple(self):
153153
154154 def test_single_image (self ):
155155 coord = [(12 , 942 , 1715 )]
156- tile = fs .tile .get_historic_event (event_id = 2 , coordinate = coord , image = True )
156+ tile = fs .tile .get_historic_event (event_id = 2 , search_items = coord , image = True )
157157 assert len (tile ) == 1
158158 assert tile [0 ].coordinate == coord [0 ]
159159 assert tile [0 ].image is not None
160160 assert tile [0 ].valid_id is True
161161
162162 def test_mixed_invalid (self ):
163163 coord = [(12 , 942 , 1715 ), (2 , 1 , 1 )]
164- tile = fs .tile .get_historic_event (event_id = 2 , coordinate = coord )
164+ tile = fs .tile .get_historic_event (event_id = 2 , search_items = coord )
165165 assert len (tile ) == 2
166166 tile .sort (key = lambda x : x .coordinate , reverse = True )
167167 assert tile [0 ].coordinate == coord [0 ]
@@ -171,7 +171,7 @@ def test_mixed_invalid(self):
171171 # No way to test if image is bad
172172
173173 def test_one_of_each (self ):
174- tile = fs .tile .get_historic_event (event_id = 2 , coordinate = [(12 , 942 , 1715 )])
174+ tile = fs .tile .get_historic_event (event_id = 2 , search_items = [(12 , 942 , 1715 )])
175175 assert len (tile ) == 1
176176 assert tile [0 ].valid_id is True
177177 assert tile [0 ].coordinate == (12 , 942 , 1715 )
0 commit comments