Skip to content

Commit

Permalink
add qa test
Browse files Browse the repository at this point in the history
  • Loading branch information
m4rc1e committed Nov 17, 2023
1 parent df791b6 commit 2eb0878
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/test_qa.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import subprocess
import os
import tempfile
import pytest


TEST_DATA = os.path.join("data", "test")

FONT = os.path.join(TEST_DATA, "MavenPro[wght].ttf")


@pytest.mark.parametrize(
"cmd,fps",
[
(
["--interpolations"],
[
os.path.join("Interpolations", "MavenPro[wght].pdf")
]
),
]
)
def test_qa(cmd, fps):
with tempfile.TemporaryDirectory() as tmp_dir:
subprocess.run(["gftools", "qa", "-f", FONT] + cmd + ["-o", tmp_dir])
for fp in fps:
assert os.path.exists(os.path.join(tmp_dir, fp)), f"'{fp}' is missing"

0 comments on commit 2eb0878

Please sign in to comment.