示例#1
0
def test_round_trip(
        bounding_boxes_pair: Tuple[BoundBoundingBox,
                                   PortedBoundingBox]) -> None:
    bound, ported = bounding_boxes_pair

    assert are_bound_ported_bounding_boxes_equal(pickle_round_trip(bound),
                                                 pickle_round_trip(ported))
示例#2
0
def test_round_trip(
    sweep_line_keys_pair: Tuple[BoundSweepLineKey,
                                PortedSweepLineKey]) -> None:
    bound, ported = sweep_line_keys_pair

    assert are_bound_ported_sweep_line_keys_equal(pickle_round_trip(bound),
                                                  pickle_round_trip(ported))
示例#3
0
def test_round_trip(
    events_queue_keys_pair: Tuple[BoundEventsQueueKey, PortedEventsQueueKey]
) -> None:
    bound, ported = events_queue_keys_pair

    assert are_bound_ported_events_queue_keys_equal(pickle_round_trip(bound),
                                                    pickle_round_trip(ported))
示例#4
0
def test_basic(pair: AlternativeNativeFractionsPair) -> None:
    alternative, native = pair

    assert are_alternative_native_fractions_equal(
        pickle_round_trip(alternative), pickle_round_trip(native))
示例#5
0
def test_round_trip(point: BoundPoint) -> None:
    assert pickle_round_trip(point) == point
示例#6
0
def test_round_trip(trapezoids_pair: BoundPortedTrapezoidsPair) -> None:
    bound, ported = trapezoids_pair

    assert are_bound_ported_trapezoids_equal(pickle_round_trip(bound),
                                             pickle_round_trip(ported))
示例#7
0
def test_round_trip(linear_ring: LinearRing) -> None:
    assert pickle_round_trip(linear_ring) == linear_ring
示例#8
0
def test_round_trip(linear_rings_pair: BoundPortedLinearRingsPair) -> None:
    bound, ported = linear_rings_pair

    assert are_bound_ported_points_lists_equal(pickle_round_trip(bound),
                                               pickle_round_trip(ported))
示例#9
0
def test_round_trip(event: BoundSweepEvent) -> None:
    assert pickle_round_trip(event) == event
示例#10
0
def test_round_trip(x_nodes_pair: BoundPortedXNodesPair) -> None:
    bound, ported = x_nodes_pair

    assert are_bound_ported_x_nodes_equal(pickle_round_trip(bound),
                                          pickle_round_trip(ported))
示例#11
0
def test_round_trip(key: BoundSweepLineKey) -> None:
    assert pickle_round_trip(key) == key
示例#12
0
def test_round_trip(operation: PortedOperation) -> None:
    assert pickle_round_trip(operation) == operation
示例#13
0
def test_round_trip(expression: Expression) -> None:
    assert pickle_round_trip(expression) == expression
示例#14
0
def test_round_trip(contour: BoundContour) -> None:
    assert pickle_round_trip(contour) == contour
示例#15
0
def test_round_trip(edges_pair: BoundPortedEdgesPair) -> None:
    bound, ported = edges_pair

    assert are_bound_ported_edges_equal(pickle_round_trip(bound),
                                        pickle_round_trip(ported))
示例#16
0
def test_round_trip(
        operations_pair: Tuple[BoundOperation, PortedOperation]) -> None:
    bound, ported = operations_pair

    assert are_bound_ported_operations_equal(pickle_round_trip(bound),
                                             pickle_round_trip(ported))
示例#17
0
def test_round_trip(int_: AlternativeInt) -> None:
    result = pickle_round_trip(int_)

    assert isinstance(result, AlternativeInt)
    assert result is not int_
    assert result == int_
示例#18
0
def test_round_trip(x_node: XNode) -> None:
    assert pickle_round_trip(x_node) == x_node
示例#19
0
def test_round_trip(contours_pair: Tuple[BoundContour, PortedContour]) -> None:
    bound, ported = contours_pair

    assert are_bound_ported_contours_equal(pickle_round_trip(bound),
                                           pickle_round_trip(ported))
示例#20
0
def test_round_trip(key: BoundEventsQueueKey) -> None:
    assert pickle_round_trip(key) == key
示例#21
0
def test_basic(pair: BoundPortedSetsPair) -> None:
    bound, ported = pair

    assert are_bound_ported_sets_equal(pickle_round_trip(bound),
                                       pickle_round_trip(ported))
示例#22
0
def test_round_trip(bounding_box: BoundBoundingBox) -> None:
    assert pickle_round_trip(bounding_box) == bounding_box
示例#23
0
def test_round_trip(points_pair: BoundPortedPointsPair) -> None:
    bound, ported = points_pair

    assert are_bound_ported_points_equal(pickle_round_trip(bound),
                                         pickle_round_trip(ported))
示例#24
0
def test_round_trip(polygon: BoundPolygon) -> None:
    assert pickle_round_trip(polygon) == polygon
示例#25
0
def test_round_trip(polygons_pair: Tuple[BoundPolygon, PortedPolygon]) -> None:
    bound, ported = polygons_pair

    assert are_bound_ported_polygons_equal(pickle_round_trip(bound),
                                           pickle_round_trip(ported))
示例#26
0
def test_round_trip(edge: Edge) -> None:
    assert pickle_round_trip(edge) == edge
示例#27
0
def test_round_trip(leaf: Leaf) -> None:
    assert pickle_round_trip(leaf) == leaf
示例#28
0
def test_round_trip(sweep_events_pair: Tuple[BoundSweepEvent, PortedSweepEvent]
                    ) -> None:
    bound, ported = sweep_events_pair

    assert are_bound_ported_sweep_events_equal(pickle_round_trip(bound),
                                               pickle_round_trip(ported))
示例#29
0
def test_round_trip(segment: PortedSegment) -> None:
    assert pickle_round_trip(segment) == segment
示例#30
0
def test_round_trip(y_node: YNode) -> None:
    assert pickle_round_trip(y_node) == y_node