Compare commits
2 Commits
2f4f61ef82
...
ce752d30e2
Author | SHA1 | Date | |
---|---|---|---|
ce752d30e2
|
|||
1365273ff0
|
33
.vscode/tasks.json
vendored
Normal file
33
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Build",
|
||||
"type": "shell",
|
||||
"linux": {
|
||||
"command": "./.venv/bin/python -m build"
|
||||
},
|
||||
"windows": {
|
||||
"command": ".\\.venv\\Scripts\\python.exe -m build"
|
||||
},
|
||||
"problemMatcher": [],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Publish",
|
||||
"type": "shell",
|
||||
"linux": {
|
||||
"command": "./.venv/bin/python -m twine upload --repository gitea ./dist/*"
|
||||
},
|
||||
"windows": {
|
||||
"command": ".\\.venv\\Scripts\\python.exe -m twine upload --repository gitea ./dist/*"
|
||||
},
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
}
|
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():
|
||||
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(
|
||||
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)
|
||||
|
||||
|
Reference in New Issue
Block a user