File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -48,16 +48,26 @@ def test__repr_png_no_image(m):
48
48
assert png is None
49
49
50
50
51
- @pytest .mark .xfail
52
51
def test__repr_png_is_bytes (m_png ):
53
52
png = m_png ._repr_png_ ()
54
53
assert isinstance (png , bytes )
55
54
56
55
57
- @pytest .mark .xfail
58
56
@pytest .mark .skipif (sys .version_info < (3 , 0 ),
59
57
reason = "Doesn't work on Python 2.7." )
60
58
def test_valid_png (m_png ):
61
59
png = m_png ._repr_png_ ()
62
60
img = PIL .Image .open (io .BytesIO (png ))
63
- isinstance (img , PIL .PngImagePlugin .PngImageFile )
61
+ assert isinstance (img , PIL .PngImagePlugin .PngImageFile )
62
+
63
+
64
+ @pytest .mark .skipif (sys .version_info < (3 , 0 ),
65
+ reason = "Doesn't work on Python 2.7." )
66
+ def test_valid_png_size (m_png ):
67
+ from folium .utilities import _parse_size
68
+ w = h = 500
69
+ m_png .width = _parse_size (w )
70
+ m_png .height = _parse_size (h )
71
+ png = m_png ._repr_png_ ()
72
+ img = PIL .Image .open (io .BytesIO (png ))
73
+ assert img .size == (w , h )
You can’t perform that action at this time.
0 commit comments