From 8537afe6574c944dcb3da075021880ca06d8348c Mon Sep 17 00:00:00 2001 From: David Schultz Date: Wed, 16 Jun 2021 15:39:17 -0500 Subject: [PATCH] Add a comment explaining why monkeypatch is used in this test --- tests/test_gallery.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_gallery.py b/tests/test_gallery.py index 00696f2..518dd87 100644 --- a/tests/test_gallery.py +++ b/tests/test_gallery.py @@ -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: