@@ -64,7 +64,7 @@ def test_location_args():
64
64
class TestFolium :
65
65
"""Test class for the Folium library."""
66
66
67
- def setup (self ):
67
+ def setup_method (self ):
68
68
"""Setup Folium Map."""
69
69
attr = "http://openstreetmap.org"
70
70
self .m = folium .Map (
@@ -191,8 +191,6 @@ def test_choropleth_features(self):
191
191
It also tests that all parameters work as expected regarding
192
192
nan and missing values.
193
193
"""
194
- self .setup ()
195
-
196
194
with open (os .path .join (rootpath , "us-counties.json" )) as f :
197
195
geo_data = json .load (f )
198
196
data = {"1001" : - 1 }
@@ -263,8 +261,6 @@ def test_choropleth_geopandas_numeric(self):
263
261
key_on field is dtype = str, while column 0 is dtype = int
264
262
All geometries have matching values (no nan_fill_color allowed)
265
263
"""
266
- self .setup ()
267
-
268
264
with open (os .path .join (rootpath , "geo_grid.json" )) as f :
269
265
geo_data = json .load (f )
270
266
@@ -296,8 +292,6 @@ def test_choropleth_geopandas_mixed(self):
296
292
key_on field is dtype = str, while column 0 is dtype = object (mixed int and str)
297
293
All geometries have matching values (no nan_fill_color allowed)
298
294
"""
299
- self .setup ()
300
-
301
295
with open (os .path .join (rootpath , "geo_grid.json" )) as f :
302
296
geo_data = json .load (f )
303
297
@@ -344,8 +338,6 @@ def test_choropleth_geopandas_str(self):
344
338
key_on field and column 0 from data are both strings.
345
339
All geometries have matching values (no nan_fill_color allowed)
346
340
"""
347
- self .setup ()
348
-
349
341
with open (os .path .join (rootpath , "geo_grid.json" )) as f :
350
342
geo_data = json .load (f )
351
343
@@ -393,8 +385,6 @@ def test_tile_attr_unicode(self):
393
385
def test_fit_bounds (self ):
394
386
"""Test fit_bounds."""
395
387
bounds = ((52.193636 , - 2.221575 ), (52.636878 , - 1.139759 ))
396
-
397
- self .setup ()
398
388
self .m .fit_bounds (bounds )
399
389
fitbounds = [
400
390
val
@@ -414,7 +404,8 @@ def test_fit_bounds(self):
414
404
415
405
assert "" .join (fit_bounds_rendered .split ()) in "" .join (out .split ())
416
406
417
- self .setup ()
407
+ def test_fit_bounds_2 (self ):
408
+ bounds = ((52.193636 , - 2.221575 ), (52.636878 , - 1.139759 ))
418
409
self .m .fit_bounds (bounds , max_zoom = 15 , padding = (3 , 3 ))
419
410
fitbounds = [
420
411
val
@@ -445,8 +436,6 @@ def test_fit_bounds(self):
445
436
446
437
def test_custom_icon (self ):
447
438
"""Test CustomIcon."""
448
- self .setup ()
449
-
450
439
icon_image = "http://leafletjs.com/docs/images/leaf-green.png"
451
440
shadow_image = "http://leafletjs.com/docs/images/leaf-shadow.png"
452
441
@@ -496,7 +485,6 @@ def test_global_switches(self):
496
485
assert m .global_switches .no_touch
497
486
assert m .global_switches .disable_3d
498
487
499
- @pytest .mark .web
500
488
def test_json_request (self ):
501
489
"""Test requests for remote GeoJSON files."""
502
490
self .m = folium .Map (zoom_start = 4 )
0 commit comments