You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
264 B

from fontTools.misc.textTools import pad
def test_pad():
assert len(pad(b'abcd', 4)) == 4
assert len(pad(b'abcde', 2)) == 6
assert len(pad(b'abcde', 4)) == 8
assert pad(b'abcdef', 4) == b'abcdef\x00\x00'
assert pad(b'abcdef', 1) == b'abcdef'