File: test_dataclasses.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 (14 lines) | stat: -rw-r--r-- 368 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from babelfont import Axis, Glyph
from io import BytesIO

def test_propagate_format_specific():
    a = Axis(name="Weight", tag="wght", _="Hello")
    assert a._ == "Hello"
    assert a._formatspecific == "Hello"

def test_write_a_negative():
    g = Glyph(name="_test", exported=False)
    s = BytesIO()
    g.write(s)
    assert "exported" in s.getvalue().decode()