File: table_builder_test.py

package info (click to toggle)
fonttools 4.61.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 27,588 kB
  • sloc: python: 145,091; xml: 103; makefile: 24
file content (15 lines) | stat: -rw-r--r-- 443 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from fontTools.ttLib.tables import otTables  # trigger setup to occur
from fontTools.ttLib.tables.otConverters import UShort
from fontTools.colorLib.table_builder import TableBuilder
import pytest


class WriteMe:
    value = None


def test_intValue_otRound():
    dest = WriteMe()
    converter = UShort("value", None, None)
    TableBuilder()._convert(dest, "value", converter, 85.6)
    assert dest.value == 86, "Should have used otRound"