Пример #1
0
 def test_pile_a_onto_b_where_b_is_not_a_list(self):
     blocks = BlockSet(5)
     assert_equals(blocks.move_a_onto_b(a = 2, b = 1), [0, [2, 1], -1, 3, 4 ])
     assert_equals(blocks.pile_a_over_b(a = 1, b = 3), [0, -1, -1, [2, 1, 3], 4])
Пример #2
0
 def test_pile_a_onto_b_where_a_is_not_a_list(self):
     blocks = BlockSet(5)
     assert_equals(blocks.move_a_onto_b(a = 4, b = 3), [0, 1, 2, [4, 3], -1])
     assert_equals(blocks.pile_a_over_b(a = 1, b = 3), [0, -1, 2, [1, 4, 3], -1])
Пример #3
0
 def test_if_pile_a_onto_b_join_both_stacks(self):
     blocks = BlockSet(5)
     assert_equals(blocks.move_a_onto_b(a = 2, b = 1), [0, [2, 1], -1, 3, 4 ])
     assert_equals(blocks.move_a_onto_b(a = 4, b = 3), [0, [2, 1], -1, [4, 3], -1])
     assert_equals(blocks.pile_a_over_b(a = 1, b = 3), [0, -1, -1, [2, 1, 4, 3], -1])