File: test_ufo_roundtrip.py

package info (click to toggle)
python-babelfont 3.0.6~ds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,740 kB
  • sloc: xml: 33,013; python: 5,762; makefile: 68
file content (15 lines) | stat: -rw-r--r-- 479 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from babelfont import load
import defcon


def test_ufo_load():
    font = load("tests/data/Test1.ufo")
    assert font.unicode_map[ord("A")] == "A"

# Can't save UFO right now
# def test_ufo_roundtrip():
#     font = load("tests/data/Test1.ufo")
#     font.save("tests/data/Test1.roundtrip.ufo")
#     dc1 = defcon.Font("tests/data/Test1.ufo")
#     dc2 = defcon.Font("tests/data/Test1.roundtrip.ufo")
#     assert dc1.getDataForSerialization() == dc2.getDataForSerialization()