Add a comment explaining why monkeypatch is used in this test

This commit is contained in:
David Schultz
2021-06-16 15:39:17 -05:00
parent c873df62b9
commit 8537afe657

View File

@@ -292,6 +292,9 @@ def test_gallery(settings, tmpdir):
def test_gallery_max_img_pixels(settings, tmpdir, monkeypatch):
"Test the Gallery class with the max_img_pixels setting."
# monkeypatch is used here to reset the value to the PIL default.
# This value does not matter, other than it is "large"
# to show that settings['max_img_pixels'] works.
monkeypatch.setattr('PIL.Image.MAX_IMAGE_PIXELS', 100_000_000)
with open(str(tmpdir.join('my.css')), mode='w') as f: