• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1from __future__ import print_function, division, absolute_import
2from fontTools.misc.py23 import *
3from fontTools.misc.textTools import pad
4
5
6def test_pad():
7    assert len(pad(b'abcd', 4)) == 4
8    assert len(pad(b'abcde', 2)) == 6
9    assert len(pad(b'abcde', 4)) == 8
10    assert pad(b'abcdef', 4) == b'abcdef\x00\x00'
11    assert pad(b'abcdef', 1) == b'abcdef'
12