mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 18:56:17 +03:00
Always initialize all plugins in registered_extensions()
This commit is contained in:
parent
7f6fe3c287
commit
2a86d7353f
|
@ -401,8 +401,6 @@ class TestImage:
|
||||||
def test_registered_extensions_uninitialized(self):
|
def test_registered_extensions_uninitialized(self):
|
||||||
# Arrange
|
# Arrange
|
||||||
Image._initialized = 0
|
Image._initialized = 0
|
||||||
extension = Image.EXTENSION
|
|
||||||
Image.EXTENSION = {}
|
|
||||||
|
|
||||||
# Act
|
# Act
|
||||||
Image.registered_extensions()
|
Image.registered_extensions()
|
||||||
|
@ -410,10 +408,6 @@ class TestImage:
|
||||||
# Assert
|
# Assert
|
||||||
assert Image._initialized == 2
|
assert Image._initialized == 2
|
||||||
|
|
||||||
# Restore the original state and assert
|
|
||||||
Image.EXTENSION = extension
|
|
||||||
assert Image.EXTENSION
|
|
||||||
|
|
||||||
def test_registered_extensions(self):
|
def test_registered_extensions(self):
|
||||||
# Arrange
|
# Arrange
|
||||||
# Open an image to trigger plugin registration
|
# Open an image to trigger plugin registration
|
||||||
|
|
|
@ -3418,8 +3418,7 @@ def registered_extensions():
|
||||||
Returns a dictionary containing all file extensions belonging
|
Returns a dictionary containing all file extensions belonging
|
||||||
to registered plugins
|
to registered plugins
|
||||||
"""
|
"""
|
||||||
if not EXTENSION:
|
init()
|
||||||
init()
|
|
||||||
return EXTENSION
|
return EXTENSION
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user