示例#1
0
def test_bifid5_square():
    A = alphabet_of_cipher()
    A.remove("J")
    f = lambda i, j: symbols(A[5*i + j])
    M = Matrix(5, 5, f)
    assert bifid5_square("") == M
示例#2
0
def test_bifid6_square():
    A = alphabet_of_cipher() + [str(a) for a in range(10)]
    f = lambda i, j: symbols(A[6*i + j])
    M = Matrix(6, 6, f)
    assert bifid6_square("") == M
示例#3
0
def test_alphabet_of_cipher():
    assert alphabet_of_cipher()[0] == "A"
    assert alphabet_of_cipher(symbols="1z") == ["1", "z"]
示例#4
0
def test_bifid7_square():
    A = alphabet_of_cipher() + [str(a) for a in range(23)]
    f = lambda i, j: symbols(A[7*i + j])
    M = Matrix(7, 7, f)
    assert bifid7_square("") == M
示例#5
0
def test_bifid5_square():
    A = alphabet_of_cipher()
    A.remove("J")
    f = lambda i, j: symbols(A[5 * i + j])
    M = Matrix(5, 5, f)
    assert bifid5_square("") == M
示例#6
0
def test_alphabet_of_cipher():
    assert alphabet_of_cipher()[0] == "A"
    assert alphabet_of_cipher(symbols="1z") == ["1", "z"]
示例#7
0
def test_bifid6_square():
    A = alphabet_of_cipher() + [str(a) for a in range(10)]
    f = lambda i, j: symbols(A[6 * i + j])
    M = Matrix(6, 6, f)
    assert bifid6_square("") == M
示例#8
0
def test_bifid7_square():
    A = alphabet_of_cipher() + [str(a) for a in range(23)]
    f = lambda i, j: symbols(A[7 * i + j])
    M = Matrix(7, 7, f)
    assert bifid7_square("") == M