4 from szyfrow
.support
.language_models
import *
6 def test_transpositions_of():
7 assert transpositions_of('clever') == (0, 2, 1, 4, 3)
8 assert transpositions_of('fred') == (3, 2, 0, 1)
9 assert transpositions_of((3, 2, 0, 1)) == (3, 2, 0, 1)
12 assert ngrams(sanitise('the quick brown fox'), 2) == ['th', 'he', 'eq',
13 'qu', 'ui', 'ic', 'ck', 'kb', 'br', 'ro', 'ow', 'wn',
15 assert ngrams(sanitise('the quick brown fox'), 4) == ['theq', 'hequ',
16 'equi', 'quic', 'uick', 'ickb', 'ckbr', 'kbro', 'brow',
17 'rown', 'ownf', 'wnfo', 'nfox']