homebrew-fonts/tests/test_formula_exists.py

14 lines
538 B
Python

"""Tests that a Formula file exists for every font."""
import pytest
from tests.conftest import FORMULA_DIR, get_font_dir_names
@pytest.mark.parametrize("font_name", get_font_dir_names())
def test_formula_file_exists(font_name):
"""Formula/font-<name>.rb exists for each font folder."""
# font_name is e.g. "font-acrylic-hand"; formula file is font-acrylic-hand.rb
formula_path = FORMULA_DIR / f"{font_name}.rb"
assert formula_path.is_file(), (
f"Missing formula for {font_name}: expected {formula_path}"
)