Made a module out of this project

This commit is contained in:
2023-08-09 20:36:47 +02:00
parent 048805bf04
commit 3387314575
9 changed files with 488 additions and 407 deletions

36
tests/test_500x500.py Normal file
View File

@@ -0,0 +1,36 @@
from os import remove
from pathlib import Path
from PIL.Image import Image
from huepaper import generate
from huepaper.utils import save_image
def test_generation():
image = generate(
width=500,
height=500,
hue_max=1.0,
lum_min=0.3,
lum_max=0.6,
sat_min=0.8,
sat_max=1.0,
)
assert isinstance(image, Image)
def test_saving():
image = generate(
500,
500,
hue_max=1.0,
lum_min=0.3,
lum_max=0.6,
sat_min=0.8,
sat_max=1.0,
lines=0.0,
)
save_image(image, Path("tests/image.jpg"))
assert Path("tests/image.jpg").exists()
remove(Path("tests/image.jpg"))