[Tests] convert eexec doctests into eexec_test.py
This commit is contained in:
parent
f22722ae51
commit
8b0130ccb3
17
Tests/misc/eexec_test.py
Normal file
17
Tests/misc/eexec_test.py
Normal file
@ -0,0 +1,17 @@
|
||||
from __future__ import print_function, division, absolute_import
|
||||
from fontTools.misc.py23 import *
|
||||
from fontTools.misc.eexec import decrypt, encrypt
|
||||
|
||||
|
||||
def test_decrypt():
|
||||
testStr = b"\0\0asdadads asds\265"
|
||||
decryptedStr, R = decrypt(testStr, 12321)
|
||||
assert decryptedStr == b'0d\nh\x15\xe8\xc4\xb2\x15\x1d\x108\x1a<6\xa1'
|
||||
assert R == 36142
|
||||
|
||||
|
||||
def test_encrypt():
|
||||
testStr = b'0d\nh\x15\xe8\xc4\xb2\x15\x1d\x108\x1a<6\xa1'
|
||||
encryptedStr, R = encrypt(testStr, 12321)
|
||||
assert encryptedStr == b"\0\0asdadads asds\265"
|
||||
assert R == 36142
|
Loading…
x
Reference in New Issue
Block a user