mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #33079 -- Fixed get_image_dimensions() on nonexistent images.
Thanks Nick Pope for the review.
This commit is contained in:
parent
c1d50b901b
commit
d0ea01af28
2 changed files with 8 additions and 1 deletions
|
@ -369,6 +369,10 @@ class GetImageDimensionsTests(unittest.TestCase):
|
|||
size = images.get_image_dimensions(fh)
|
||||
self.assertEqual(size, (None, None))
|
||||
|
||||
def test_missing_file(self):
|
||||
size = images.get_image_dimensions('missing.png')
|
||||
self.assertEqual(size, (None, None))
|
||||
|
||||
@unittest.skipUnless(HAS_WEBP, 'WEBP not installed')
|
||||
def test_webp(self):
|
||||
img_path = os.path.join(os.path.dirname(__file__), 'test.webp')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue