Esempio n. 1
0
def test_node_with_forward_diagonal_string_not_found():
    string = "ABCDEFGHIIIKL"
    node = Node(f=string)

    assert node.count_mutant_genes() == 0
Esempio n. 2
0
def test_node_with_backward_diagonal_string_found():
    string = "AAGCCCCCCTTT"
    node = Node(b=string)

    assert node.count_mutant_genes() == 1
Esempio n. 3
0
def test_node_with_vertical_string_not_found():
    string = "ABCDEFGHIIIKL"
    node = Node(v=string)

    assert node.count_mutant_genes() == 0
Esempio n. 4
0
def test_node_with_vertical_string_found():
    string = "AAGCCCCCCTTT"
    node = Node(h=string)

    assert node.count_mutant_genes() == 1
Esempio n. 5
0
def test_node_with_horizontal_string_long_enough_found():
    string = "AAAA"
    node = Node(h=string)

    assert node.count_mutant_genes() == 1
Esempio n. 6
0
def test_node_with_horizontal_string_too_short():
    string = "AAA"
    node = Node(h=string)

    assert node.count_mutant_genes() == 0
Esempio n. 7
0
def test_count_mutant_genes():
    string = "AAGCCCCCCTTT"
    node = Node(b=string, h=string, f=string, v=string)

    assert node.count_mutant_genes() == 4