Improved tests
This commit is contained in:
parent
2f4f61ef82
commit
1365273ff0
BIN
tests/assets/emblem.png
Normal file
BIN
tests/assets/emblem.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.8 KiB |
@ -8,14 +8,44 @@ from huepaper.utils import save_image
|
|||||||
|
|
||||||
|
|
||||||
def test_generation():
|
def test_generation():
|
||||||
|
image = generate()
|
||||||
|
assert isinstance(image, Image)
|
||||||
|
|
||||||
|
|
||||||
|
def test_generation_example_1():
|
||||||
|
image = generate(color="lightgreen")
|
||||||
|
assert isinstance(image, Image)
|
||||||
|
|
||||||
|
|
||||||
|
def test_generation_example_2():
|
||||||
|
image = generate(color="#ff7f50", lines_bright=0.05)
|
||||||
|
assert isinstance(image, Image)
|
||||||
|
|
||||||
|
|
||||||
|
def test_generation_example_3():
|
||||||
|
image = generate(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_generation_example_4():
|
||||||
|
image = generate(hue_max=0.3, lum_min=0.5, lum_max=0.5, lines=0.5, pixelate="64x36")
|
||||||
|
assert isinstance(image, Image)
|
||||||
|
|
||||||
|
|
||||||
|
def test_generation_example_5():
|
||||||
|
image = generate(
|
||||||
|
lines=0.3,
|
||||||
|
lines_bright=0.1,
|
||||||
|
lines_dark=0.1,
|
||||||
|
emblem=Path("tests/assets/emblem.png"),
|
||||||
|
)
|
||||||
|
assert isinstance(image, Image)
|
||||||
|
|
||||||
|
|
||||||
|
def test_generation_example_6():
|
||||||
image = generate(
|
image = generate(
|
||||||
width=500,
|
width=500,
|
||||||
height=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)
|
assert isinstance(image, Image)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user