예제 #1
0
def test_node_with_forward_diagonal_string_not_found():
    string = "ABCDEFGHIIIKL"
    node = Node(f=string)

    assert node.count_mutant_genes() == 0
예제 #2
0
def test_node_with_backward_diagonal_string_found():
    string = "AAGCCCCCCTTT"
    node = Node(b=string)

    assert node.count_mutant_genes() == 1
예제 #3
0
def test_node_with_vertical_string_not_found():
    string = "ABCDEFGHIIIKL"
    node = Node(v=string)

    assert node.count_mutant_genes() == 0
예제 #4
0
def test_node_with_vertical_string_found():
    string = "AAGCCCCCCTTT"
    node = Node(h=string)

    assert node.count_mutant_genes() == 1
예제 #5
0
def test_node_with_horizontal_string_long_enough_found():
    string = "AAAA"
    node = Node(h=string)

    assert node.count_mutant_genes() == 1
예제 #6
0
def test_node_with_horizontal_string_too_short():
    string = "AAA"
    node = Node(h=string)

    assert node.count_mutant_genes() == 0
예제 #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