Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix linting errors in test_agg.py
  • Loading branch information
kinshukdua committed Oct 11, 2021
commit 42d2ee46a128020d77b6e7f113ca57191b21447d
3 changes: 2 additions & 1 deletion lib/matplotlib/tests/test_agg.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ def test_pil_kwargs_tiff():
tags = {TiffTags.TAGS_V2[k].name: v for k, v in im.tag_v2.items()}
assert tags["ImageDescription"] == "test image"


def test_pil_kwargs_webp():
plt.plot([0, 1, 2], [0, 1, 0])
buf_small = io.BytesIO()
Expand All @@ -258,13 +259,13 @@ def test_pil_kwargs_webp():
plt.savefig(buf_large, format="webp", pil_kwargs=pil_kwargs_high)
assert buf_large.getbuffer().nbytes > buf_small.getbuffer().nbytes


def test_webp_alpha():
plt.plot([0, 1, 2], [0, 1, 0])
buf = io.BytesIO()
plt.savefig(buf, format="webp", transparent=True)
im = Image.open(buf)
assert im.mode == "RGBA"



def test_draw_path_collection_error_handling():
Expand Down