File: test_axisregistry_api.py

package info (click to toggle)
axisregistry 0.4.16-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,468 kB
  • sloc: python: 1,144; makefile: 4
file content (15 lines) | stat: -rw-r--r-- 546 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from axisregistry import AxisRegistry


def test_AxisRegistry():
    registry = AxisRegistry()
    assert "GRAD" in registry.keys()
    for axis_tag in registry.keys():
        assert len(axis_tag) == 4
        assert len(registry[axis_tag].fallback) > 0
        for f in range(len(registry[axis_tag].fallback)):
            fallback = registry[axis_tag].fallback[f]

            # fallback names should not be space-separated.
            # (see: https://github.com/googlefonts/axisregistry/issues/7)
            assert " " not in fallback.name