Use auto_register's filter_func to filter tests
@@ -2,28 +2,29 @@ from fontbakery.checkrunner import Section
from fontbakery.fonts_spec import spec_factory
-def check_filter(checkid, font=None, **iterargs):
- if checkid in (
+def check_filter(item_type, item_id, item):
+ if item_type == "check" and item_id in (
"com.google.fonts/check/035", # ftxvalidator
"com.google.fonts/check/036", # ots-sanitize
"com.google.fonts/check/037", # Font Validator
"com.google.fonts/check/038", # Fontforge
"com.google.fonts/check/039", # Fontforge
):
- return False, "Skipping external tools."
+ return False
- return True, None
+ return True
def test_external_specification():
"""Test the creation of external specifications."""
specification = spec_factory(default_section=Section("Dalton Maag OpenType"))
- specification.set_check_filter(check_filter)
specification.auto_register(
- globals(), spec_imports=["fontbakery.specifications.opentype"])
+ globals(),
+ spec_imports=["fontbakery.specifications.opentype"],
+ filter_func=check_filter)
# Probe some tests
- expected_tests = ["com.google.fonts/check/002", "com.google.fonts/check/180"]
+ expected_tests = ["com.google.fonts/check/002", "com.google.fonts/check/171"]
specification.test_expected_checks(expected_tests)
# Probe tests we don't want
