Beispiel #1
0
def ignore_Diamond_plot_other_letter():
    assert diamond.Diamond('C').diamond() == \
        [[" ", " ", "A", " ", " "],
         [" ", "B", " ", "B", " "],
         ["C", " ", " ", " ", "C"],
         [" ", "B", " ", "B", " "],
         [" ", " ", "A", " ", " "]]
Beispiel #2
0
def ignore_Diamond_with_minus2_1_coordinates_marked_with_a_Z():
    assert diamond.Diamond('C').diamond() == \
        [[" ", " ", " ", " ", " "],
         ["Z", " ", " ", " ", " "],
         [" ", " ", " ", " ", " "],
         [" ", " ", " ", " ", " "],
         [" ", " ", " ", " ", " "]]
Beispiel #3
0
def ignore_DiamondB():
    assert diamond.Diamond('B').print_diamond() == " A\nB B\n A"
def ignore_DiamondD_is_correct():
    assert diamond.Diamond('D').print_diamond() == """\
def ignore_rows_is_a_list_of_all_diamond_rows():
    assert diamond.Diamond('A').rows() == ["A"]
def test_diamondA_has_one_line_containing_a():
    assert diamond.Diamond('A').print_diamond() == "A"
def ignore_indents_is_list_of_indentation_for_each_line_of_the_diamond():
    assert diamond.Diamond('A').indents == [0]
Beispiel #8
0
def ignore_DiamondC_has_spaces_on_middle_rows():
    assert diamond.Diamond('C').print_diamond() == """\
Beispiel #9
0
def ignore_DiamondC_duplicates_letters_on_middle_rows():
    assert diamond.Diamond('C').print_diamond() == """\
Beispiel #10
0
def ignore_Diamond_with_1_0_coordinates_marked_with_a_Z():
    assert diamond.Diamond('A').diamond() == [[" "]]
Beispiel #11
0
def ignore_Diamond_with_center_marked_with_a_Z():
    assert diamond.Diamond('A').diamond() == [["Z"]]
Beispiel #12
0
def ignore_Diamond_with_only_spaces():
    assert diamond.Diamond('A').diamond() == [[" "]]
Beispiel #13
0
def ignore_DiamondD():
    assert diamond.Diamond('D').print_diamond() == """\
Beispiel #14
0
def ignore_DiamondC():
    assert diamond.Diamond('C').print_diamond() == """\
Beispiel #15
0
def ignore_DiamondC_indents_all_rows_except_middle():
    assert diamond.Diamond('C').print_diamond() == """\
Beispiel #16
0
def ignore_DiamondB_duplicates_the_middle_B():
    assert diamond.Diamond('B').print_diamond() == " A\nBB\n A"
Beispiel #17
0
def ignore_Diamond_plot_As():
    assert diamond.Diamond('B').diamond() == \
        [[" ", "A", " "],
         [" ", " ", " "],
         [" ", "A", " "]]
Beispiel #18
0
def ignore_DiamondB_has_a_space_between_the_two_Bs():
    assert diamond.Diamond('B').print_diamond() == " A\nB B\n A"
def test_a():
    assert diamond.Diamond('A').print_diamond() == "A"
Beispiel #20
0
 def setUp(self):
     self.dia = diamond.Diamond()
Beispiel #21
0
def ignore_DiamondB_prints_a_char_sequence_for_the_top_half():
    assert diamond.Diamond('B').print_diamond() == "AB"
def ignore_between_is_list_of_how_many_middle_spaces_between_the_repeated_letter_for_each_line_of_the_diamond(
):
    assert diamond.Diamond('A').between == [0]
Beispiel #23
0
def ignore_DiamondC_prints_a_char_sequence_for_the_top_and_bottom__halves():
    assert diamond.Diamond('C').print_diamond() == "ABCBA"
def ignore_one_row_is_a_list_representing_one_diamond_row():
    assert diamond.Diamond('A').one_row('A', indent=0, between=0) == "A"
Beispiel #25
0
def ignore_DiamondB_separates_rows():
    assert diamond.Diamond('B').print_diamond() == "A\nB\nA"
def ignore_DiamondC_prints_correctly():
    assert diamond.Diamond('C').print_diamond() == """\
Beispiel #27
0
def ignore_DiamondB_indents_first_and_last_rows():
    assert diamond.Diamond('B').print_diamond() == " A\nB\n A"
def ignore_letter_sequence_is_list_of_letters_on_each_line_of_the_diamond():
    assert diamond.Diamond('A').letter_sequence == ['A']
Beispiel #29
0
def ignore_Diamond_plot_As_and_middle_letter():
    assert diamond.Diamond('B') == \
        [[" ", "A", " "],
         ["B", " ", "B"],
         [" ", "A", " "]]