diff options
| author | Stefanos I. Tsaklidis <ctefanos.t@gmail.com> | 2021-05-24 18:10:00 +0300 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-09-02 07:08:50 +0200 |
| commit | d0ea01af2814e276c4a090e599d5fd11c6ce4bf8 (patch) | |
| tree | 89df1d723513ed185eb19864081324c757eccb49 /tests/files/tests.py | |
| parent | c1d50b901b50672a46e7e5fe473c14da1616fc4e (diff) | |
Fixed #33079 -- Fixed get_image_dimensions() on nonexistent images.
Thanks Nick Pope for the review.
Diffstat (limited to 'tests/files/tests.py')
| -rw-r--r-- | tests/files/tests.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/files/tests.py b/tests/files/tests.py index 2df9c98f60..bb7ce218c7 100644 --- a/tests/files/tests.py +++ b/tests/files/tests.py @@ -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') |
