fix test
This commit is contained in:
@@ -1,17 +1,23 @@
|
||||
import io
|
||||
from pathlib import Path
|
||||
|
||||
from PIL import Image
|
||||
|
||||
from lama_cleaner.helper import pil_to_bytes
|
||||
|
||||
|
||||
current_dir = Path(__file__).parent.absolute().resolve()
|
||||
png_img_p = current_dir / "image.png"
|
||||
jpg_img_p = current_dir / "bunny.jpeg"
|
||||
|
||||
|
||||
def print_exif(exif):
|
||||
for k, v in exif.items():
|
||||
print(f"{k}: {v}")
|
||||
|
||||
|
||||
def test_png():
|
||||
img = Image.open("image.png")
|
||||
img = Image.open(png_img_p)
|
||||
exif = img.getexif()
|
||||
print_exif(exif)
|
||||
|
||||
@@ -24,7 +30,7 @@ def test_png():
|
||||
|
||||
|
||||
def test_jpeg():
|
||||
img = Image.open("bunny.jpeg")
|
||||
img = Image.open(jpg_img_p)
|
||||
exif = img.getexif()
|
||||
print_exif(exif)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user