コード例 #1
0
	def test_outside(self):
		"""Find spots that point outward from occupied rect
		until INF.
		"""
		
		cloud = RectangleCloud([R(0, 0, 10, 10)])
		rectangle = R(0, 0, 10, 10)
		occ = cloud.get_occupied_rect()
		
		seed = (5, 10)
		direction = DIRECTION_UP
		spot = cloud._get_spot(rectangle, seed, direction)
		
		expected_spot = R(occ.x - INF, 10, 10 + 2 * INF, INF)