tests/style: simplify logic assertions
@@ -311,24 +311,24 @@ class TestFolium(object):
def test_global_switches(self):
m = folium.Map(prefer_canvas=True)
- assert (m.global_switches.prefer_canvas is True and
- m.global_switches.no_touch is False and
- m.global_switches.disable_3d is False)
+ assert m.global_switches.prefer_canvas
+ assert not m.global_switches.no_touch
+ assert not m.global_switches.disable_3d
m = folium.Map(no_touch=True)
- assert (m.global_switches.prefer_canvas is False and
- m.global_switches.no_touch is True and
- m.global_switches.disable_3d is False)
+ assert not m.global_switches.prefer_canvas
+ assert m.global_switches.no_touch
+ assert not m.global_switches.disable_3d
m = folium.Map(disable_3d=True)
- assert (m.global_switches.prefer_canvas is False and
- m.global_switches.no_touch is False and
- m.global_switches.disable_3d is True)
+ assert not m.global_switches.prefer_canvas
+ assert not m.global_switches.no_touch
+ assert m.global_switches.disable_3d
m = folium.Map(prefer_canvas=True, no_touch=True, disable_3d=True)
- assert (m.global_switches.prefer_canvas is True and
- m.global_switches.no_touch is True and
- m.global_switches.disable_3d is True)
+ assert m.global_switches.prefer_canvas
+ assert m.global_switches.no_touch
+ assert m.global_switches.disable_3d
@pytest.mark.web
def test_json_request(self):
