def test_first(node1, node2, default_config): manager = Manager(bbox=Bbox.from_nodes(node_left_down=node1, node_right_up=node2), configuration=default_config) manager._generate_small_bboxes() assert manager.small_bboxes[0].left == node1.longitude assert manager.small_bboxes[0].bottom == node1.latitude
def test_big_bbox(node1, node2): manager = Manager(bbox=Bbox.from_nodes(node_left_down=node1, node_right_up=node2)) length = len(manager.small_bboxes) manager._generate_small_bboxes() assert manager.small_bboxes[0].left == node1.longitude assert manager.small_bboxes[0].bottom == node1.latitude assert (manager.small_bboxes[length - 1].right >= node2.longitude and manager.small_bboxes[length - 1].right <= node2.longitude + 0.05) assert (manager.small_bboxes[length - 1].top >= node2.latitude and manager.small_bboxes[length - 1].top <= node2.latitude + 0.05)
def test_big_bbox(node1, node2): manager = Manager(bbox=Bbox.from_leftdown_rightup(node1, node2), job_queue_name='dummy') length = len(manager.small_bboxes) manager._generate_small_bboxes() assert manager.small_bboxes[0].left == node1.longitude assert manager.small_bboxes[0].bottom == node1.latitude assert (manager.small_bboxes[length - 1].right >= node2.longitude and manager.small_bboxes[length - 1].right <= node2.longitude + 0.05) assert (manager.small_bboxes[length - 1].top >= node2.latitude and manager.small_bboxes[length - 1].top <= node2.latitude + 0.05)
def test_big_bbox(node1, node2): manager = Manager( bbox=Bbox.from_nodes(node_left_down=node1, node_right_up=node2)) length = len(manager.small_bboxes) manager._generate_small_bboxes() assert manager.small_bboxes[0].left == node1.longitude assert manager.small_bboxes[0].bottom == node1.latitude assert (manager.small_bboxes[length - 1].right >= node2.longitude and manager.small_bboxes[length - 1].right <= node2.longitude + 0.05) assert (manager.small_bboxes[length - 1].top >= node2.latitude and manager.small_bboxes[length - 1].top <= node2.latitude + 0.05)
def test_first(node1, node2): manager = Manager(bbox=Bbox.from_leftdown_rightup(node1, node2), job_queue_name='dummy') manager._generate_small_bboxes() assert manager.small_bboxes[0].left == node1.longitude assert manager.small_bboxes[0].bottom == node1.latitude
def test_first(node1, node2): manager = Manager(bbox=Bbox.from_nodes(node_left_down=node1, node_right_up=node2)) manager._generate_small_bboxes() assert manager.small_bboxes[0].left == node1.longitude assert manager.small_bboxes[0].bottom == node1.latitude