File: variableScalar_test.py

package info (click to toggle)
fonttools 4.61.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 27,584 kB
  • sloc: python: 145,091; xml: 103; makefile: 24
file content (10 lines) | stat: -rw-r--r-- 311 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
from fontTools.feaLib.variableScalar import VariableScalar


def test_variable_scalar_repr():
    scalar = VariableScalar()
    scalar.add_value({"wght": 400}, 1)
    scalar.add_value({"wght": 500.5}, 4)
    scalar.add_value({"wght": 700}, 10)

    assert str(scalar) == "(wght=400:1 wght=500.5:4 wght=700:10)"