1from fontTools.ttLib.tables._f_p_g_m import table__f_p_g_m
2from fontTools.ttLib.tables import ttProgram
3
4
5def test__bool__():
6    fpgm = table__f_p_g_m()
7    assert not bool(fpgm)
8
9    p = ttProgram.Program()
10    fpgm.program = p
11    assert not bool(fpgm)
12
13    bc = bytearray([0])
14    p.fromBytecode(bc)
15    assert bool(fpgm)
16
17    p.bytecode.pop()
18    assert not bool(fpgm)
19