Fixed -p and improved coverage
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from os import remove
|
||||
from pathlib import Path
|
||||
from subprocess import run
|
||||
|
||||
from PIL.Image import Image
|
||||
|
||||
@@ -28,6 +29,31 @@ def test_saving():
|
||||
remove(Path("tests/image.jpg"))
|
||||
|
||||
|
||||
def test_shell():
|
||||
assert (
|
||||
run(
|
||||
[
|
||||
"huepaper",
|
||||
"-hue",
|
||||
"0.3",
|
||||
"-lmin",
|
||||
"0.5",
|
||||
"-lmax",
|
||||
"0.3",
|
||||
"-l",
|
||||
"0.5",
|
||||
"-p",
|
||||
"64x36",
|
||||
"-o",
|
||||
"tests/image.jpg",
|
||||
],
|
||||
check=False,
|
||||
).returncode
|
||||
== 0
|
||||
)
|
||||
remove(Path("tests/image.jpg"))
|
||||
|
||||
|
||||
def test_generation_example_1():
|
||||
image = generate(color="lightgreen")
|
||||
assert isinstance(image, Image)
|
Reference in New Issue
Block a user