aboutsummaryrefslogtreecommitdiff
path: root/Tests/ttLib/tables/_f_p_g_m_test.py
blob: ff233dd9cdedad425f85f1d0990d3cd3275682e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from fontTools.ttLib.tables._f_p_g_m import table__f_p_g_m
from fontTools.ttLib.tables import ttProgram


def test__bool__():
    fpgm = table__f_p_g_m()
    assert not bool(fpgm)

    p = ttProgram.Program()
    fpgm.program = p
    assert not bool(fpgm)

    bc = bytearray([0])
    p.fromBytecode(bc)
    assert bool(fpgm)

    p.bytecode.pop()
    assert not bool(fpgm)