fonttools/Tests/ttLib/tables/_f_p_g_m_test.py
Just van Rossum 5fc65d7168
Misc py23 cleanups (#2243)
* Replaced all from ...py23 import * with explicit name imports, or removed completely when possible.
* Replaced tounicode() with tostr()
* Changed all BytesIO ans StringIO imports to from io import ..., replaced all UnicodeIO with StringIO.
* Replaced all unichr() with chr()
* Misc minor tweaks and fixes
2021-03-29 11:45:58 +02:00

19 lines
374 B
Python

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)