예제 #1
0
파일: move.py 프로젝트: victorhg/pycon_cube
	def test_cannot_move_down(self):
		binary = make_binary(['...............x.'])
		self.assertFalse(can_move_down(binary[0]))
예제 #2
0
파일: move.py 프로젝트: victorhg/pycon_cube
	def test_can_move_down(self):
		binary = make_binary(['....x............'])
		self.assertTrue(can_move_down(binary[0]))
예제 #3
0
파일: move.py 프로젝트: victorhg/pycon_cube
	def test_cannot_move_right_on_edge(self):
		binary = make_binary(['...............x'])
		self.assertFalse(can_move_right(binary[0]))
예제 #4
0
파일: move.py 프로젝트: victorhg/pycon_cube
	def test_move_down(self):
		binary = make_binary(['....x............'])
		expected = make_binary(['........x.......'])
		result = move_down(binary[0])
		self.assertEquals(expected[0], result)
예제 #5
0
파일: move.py 프로젝트: victorhg/pycon_cube
	def test_move_right_bigger_piece(self):
		cube = ['x...............................']
		binaries = make_binary(cube)
		expected_result = make_binary(['.x...............................'])
		result = move_right(binaries[0])
		self.assertEquals(expected_result[0], result)
예제 #6
0
파일: move.py 프로젝트: victorhg/pycon_cube
	def test_move_right(self):
		cube = ['x...']
		binaries = make_binary(cube)
		binaries_results = make_binary(['.x..'])
		result = move_right(binaries[0])
		self.assertEquals(result, binaries_results[0])