Merge pull request #6811 from radarhere/registered_extensions

Resolves https://github.com/python-pillow/Pillow/issues/6809
This commit is contained in:
Hugo van Kemenade 2022-12-23 15:59:53 +02:00 committed by GitHub
commit f9c88c984e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 8 deletions

View File

@ -401,8 +401,6 @@ class TestImage:
def test_registered_extensions_uninitialized(self):
# Arrange
Image._initialized = 0
extension = Image.EXTENSION
Image.EXTENSION = {}
# Act
Image.registered_extensions()
@ -410,10 +408,6 @@ class TestImage:
# Assert
assert Image._initialized == 2
# Restore the original state and assert
Image.EXTENSION = extension
assert Image.EXTENSION
def test_registered_extensions(self):
# Arrange
# Open an image to trigger plugin registration

View File

@ -3417,8 +3417,7 @@ def registered_extensions():
Returns a dictionary containing all file extensions belonging
to registered plugins
"""
if not EXTENSION:
init()
init()
return EXTENSION