s/cypher/cipher/g ... (sigh) I must have been sleepy :P

This commit is contained in:
Dan Buch 2009-11-26 08:42:57 -05:00
parent 40d222c164
commit 8cf3df0e3e
2 changed files with 6 additions and 6 deletions

View File

@ -45,7 +45,7 @@ def _padfill(text, pad):
padlines = pad.splitlines()
textlines = _chunk_chars_into_lines(text, _get_textwidth(pad))
for lineno, padline in enumerate(padlines[:]):
if _is_padline(lineno) or _is_cypherline(lineno):
if _is_padline(lineno) or _is_cipherline(lineno):
continue
else:
padlines[lineno] = textlines.pop(0) if textlines[1:] else ''
@ -64,8 +64,8 @@ def _is_txtline(lineno):
return (lineno % 2 and not lineno % 3)
def _is_cypherline(lineno):
return lineno % 3
def _is_cipherline(lineno):
return lineno % PAD_MODULO
def _mk_as_alpha():

View File

@ -28,9 +28,9 @@ class TestOneTimePad(unittest.TestCase):
elif OT._is_txtline(lineno):
self.assertFalse(bool(len(line)),
'text line {0} is empty'.format(lineno))
elif OT._is_cypherline(lineno):
elif OT._is_cipherline(lineno):
self.assertFalse(bool(len(line)),
'cypher line {0} is empty'.format(lineno))
'cipher line {0} is empty'.format(lineno))
else:
raise NotImplementedError(lineno)
@ -41,7 +41,7 @@ class TestOneTimePad(unittest.TestCase):
self.assertTrue(bool(filled))
for lineno, line in enumerate(filled):
line = line.strip()
if OT._is_cypherline(lineno):
if OT._is_cipherline(lineno):
self.assertFalse(bool(len(line)),
'line {0} is empty'.format(lineno))
elif OT._is_txtline(lineno):