[Tests] covert textTools doctests into textTools_test.py
This commit is contained in:
parent
7a62f04adf
commit
34474743f5
11
Tests/misc/textTools_test.py
Normal file
11
Tests/misc/textTools_test.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
from __future__ import print_function, division, absolute_import
|
||||||
|
from fontTools.misc.py23 import *
|
||||||
|
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'
|
Loading…
x
Reference in New Issue
Block a user