This commit is contained in:
João S. O. Bueno 2022-10-06 18:02:19 -03:00
parent 2f6467c94e
commit b471158498

View File

@ -22,7 +22,6 @@ def test_sanity():
def test_large_file_is_truncated(): def test_large_file_is_truncated():
import warnings import warnings
from unittest.mock import patch
try: try:
original_value = GimpPaletteFile._max_file_size original_value = GimpPaletteFile._max_file_size
@ -31,7 +30,7 @@ def test_large_file_is_truncated():
warnings.simplefilter("error") warnings.simplefilter("error")
with pytest.raises(UserWarning): with pytest.raises(UserWarning):
with open("Tests/images/custom_gimp_palette.gpl", "rb") as fp: with open("Tests/images/custom_gimp_palette.gpl", "rb") as fp:
palette_file = GimpPaletteFile(fp) GimpPaletteFile(fp)
finally: finally:
GimpPaletteFile._max_file_size = original_value GimpPaletteFile._max_file_size = original_value