test_axisregistry_api.py 546 B

123456789101112131415
  1. from axisregistry import AxisRegistry
  2. def test_AxisRegistry():
  3. registry = AxisRegistry()
  4. assert "GRAD" in registry.keys()
  5. for axis_tag in registry.keys():
  6. assert len(axis_tag) == 4
  7. assert len(registry[axis_tag].fallback) > 0
  8. for f in range(len(registry[axis_tag].fallback)):
  9. fallback = registry[axis_tag].fallback[f]
  10. # fallback names should not be space-separated.
  11. # (see: https://github.com/googlefonts/axisregistry/issues/7)
  12. assert " " not in fallback.name