def test_rotate_02(): """Test whether four consecutive rotations bring us back to the original.""" for poem in poem_list: (F.regularize_line_length(F.clean_poem(poem)) == F.rotate_lines( F.rotate_lines(F.rotate_lines(F.rotate_lines( F.regularize_line_length(F.clean_poem(poem)))) ) ) )
def test_rotate_01(): """Test whether rotated poem-section matches expected form.""" for poem, rotation in zip(poem_list, rotation_list): poem = F.clean_poem(poem) section = F.regularize_line_length(poem[0]) assert F.rotate_lines(section) == rotation