def test_wasteland_large_wastes_reverse(): landmarks = [ 1, 1, 1, 20, 1, 1, 20, 1, 1, 1, 100, 1, 1, 1, 1, 1, 1, 1, ] ws.sort(landmarks, True) assert [100, 20, 20, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] == landmarks
def test_wasteland_large_wastes(): landmarks = [ 1, 1, 1, 20, 1, 1, 20, 1, 1, 1, 100, 1, 1, 1, 1, 1, 1, 1, ] ws.sort(landmarks, False) assert [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 20, 20, 100] == landmarks
def test_wasteland_reverse_empty(): assert [] == ws.sort([], True)
def test_wasteland_empty(): assert [] == ws.sort([], False)
def test_wasteland_already_sorted(): landmarks = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] ws.sort(landmarks, False) assert landmarks == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
def test_wasteland_reverse_out_of_order(): landmarks = [10, 9, 7, 4, 6, 2, 1, 5, 8, 3] ws.sort(landmarks, True) assert [10, 9, 8, 7, 6, 5, 4, 3, 2, 1] == landmarks
def test_wasteland_reverse_already_sorted(): landmarks = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1] ws.sort(landmarks, True) assert landmarks == [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
def test_wasteland_out_of_order(): landmarks = [10, 9, 7, 4, 6, 2, 1, 5, 8, 3] ws.sort(landmarks, False) assert [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] == landmarks