fixed formatting (#1096)
This commit is contained in:
@@ -19,7 +19,7 @@ TEST_IMAGE_DOES_NOT_EXIST = "tests/test-images/NOT-A-FILE.heic"
|
||||
|
||||
|
||||
def test_image_converter_singleton():
|
||||
""" test that ImageConverter is a singleton """
|
||||
"""test that ImageConverter is a singleton"""
|
||||
from osxphotos.imageconverter import ImageConverter
|
||||
|
||||
convert1 = ImageConverter()
|
||||
@@ -29,9 +29,10 @@ def test_image_converter_singleton():
|
||||
|
||||
|
||||
def test_image_converter():
|
||||
""" test conversion of different image types """
|
||||
"""test conversion of different image types"""
|
||||
import pathlib
|
||||
import tempfile
|
||||
|
||||
from osxphotos.imageconverter import ImageConverter
|
||||
|
||||
converter = ImageConverter()
|
||||
@@ -50,9 +51,10 @@ def test_image_converter():
|
||||
|
||||
|
||||
def test_image_converter_compression_quality():
|
||||
""" test conversion of different image types with custom compression quality """
|
||||
"""test conversion of different image types with custom compression quality"""
|
||||
import pathlib
|
||||
import tempfile
|
||||
|
||||
from osxphotos.imageconverter import ImageConverter
|
||||
|
||||
converter = ImageConverter()
|
||||
@@ -69,9 +71,10 @@ def test_image_converter_compression_quality():
|
||||
|
||||
|
||||
def test_image_converter_bad_compression_quality():
|
||||
""" test illegal compression quality """
|
||||
"""test illegal compression quality"""
|
||||
import pathlib
|
||||
import tempfile
|
||||
|
||||
from osxphotos.imageconverter import ImageConverter
|
||||
|
||||
converter = ImageConverter()
|
||||
@@ -86,10 +89,11 @@ def test_image_converter_bad_compression_quality():
|
||||
|
||||
|
||||
def test_image_converter_bad_file():
|
||||
""" Try to convert a file that's not an image """
|
||||
"""Try to convert a file that's not an image"""
|
||||
import pathlib
|
||||
import tempfile
|
||||
from osxphotos.imageconverter import ImageConverter, ImageConversionError
|
||||
|
||||
from osxphotos.imageconverter import ImageConversionError, ImageConverter
|
||||
|
||||
converter = ImageConverter()
|
||||
tempdir = tempfile.TemporaryDirectory(prefix="osxphotos_")
|
||||
@@ -101,9 +105,10 @@ def test_image_converter_bad_file():
|
||||
|
||||
|
||||
def test_image_converter_missing_file():
|
||||
""" Try to convert a file that's not an image """
|
||||
"""Try to convert a file that's not an image"""
|
||||
import pathlib
|
||||
import tempfile
|
||||
|
||||
from osxphotos.imageconverter import ImageConverter
|
||||
|
||||
converter = ImageConverter()
|
||||
@@ -113,4 +118,3 @@ def test_image_converter_missing_file():
|
||||
outfile = pathlib.Path(tempdir.name) / f"{imgfile.stem}.jpeg"
|
||||
with pytest.raises(FileNotFoundError):
|
||||
converter.write_jpeg(imgfile, outfile)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user