def test_top_and_bottom_mixed_face_is_domino(): for _ in range(TEST_SIZE): face = CubeFace(0) for row in (0, 2): face.set_line(row, choices([0, 5], k=3)) assert face.is_domino
def test_an_unsolved_rotated_face_is_still_unsolved(): face = CubeFace(5) face.set_line(0, (5, 3, 2)) for _ in range(4): face.rotate() assert not face.is_solved
def test_face_with_a_facelet_replaced_is_not_solved(): face = CubeFace(4) face.set_line(3, (2, 4, 4)) assert not face.is_solved
def test_cube_string_is_correct_with_a_row_replaced(): face = CubeFace(0) face.set_line(2, (2, 5, 3)) assert face.cube_string == "UUUUUUFDR"
def test_bottom_face_with_a_side_facelet_is_not_domino(): face = CubeFace(5) face.set_line(0, [4, 5, 5]) assert not face.is_domino
def test_top_face_with_a_side_facelet_is_not_domino(): face = CubeFace(0) face.set_line(2, [0, 2, 0]) assert not face.is_domino