Exemplo n.º 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))
Exemplo n.º 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))
Exemplo n.º 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))
Exemplo n.º 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))
Exemplo n.º 5
0
def test_round_trip(point: BoundPoint) -> None:
    assert pickle_round_trip(point) == point
Exemplo n.º 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))
Exemplo n.º 7
0
def test_round_trip(linear_ring: LinearRing) -> None:
    assert pickle_round_trip(linear_ring) == linear_ring
Exemplo n.º 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))
Exemplo n.º 9
0
def test_round_trip(event: BoundSweepEvent) -> None:
    assert pickle_round_trip(event) == event
Exemplo n.º 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))
Exemplo n.º 11
0
def test_round_trip(key: BoundSweepLineKey) -> None:
    assert pickle_round_trip(key) == key
Exemplo n.º 12
0
def test_round_trip(operation: PortedOperation) -> None:
    assert pickle_round_trip(operation) == operation
Exemplo n.º 13
0
def test_round_trip(expression: Expression) -> None:
    assert pickle_round_trip(expression) == expression
Exemplo n.º 14
0
def test_round_trip(contour: BoundContour) -> None:
    assert pickle_round_trip(contour) == contour
Exemplo n.º 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))
Exemplo n.º 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))
Exemplo n.º 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_
Exemplo n.º 18
0
def test_round_trip(x_node: XNode) -> None:
    assert pickle_round_trip(x_node) == x_node
Exemplo n.º 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))
Exemplo n.º 20
0
def test_round_trip(key: BoundEventsQueueKey) -> None:
    assert pickle_round_trip(key) == key
Exemplo n.º 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))
Exemplo n.º 22
0
def test_round_trip(bounding_box: BoundBoundingBox) -> None:
    assert pickle_round_trip(bounding_box) == bounding_box
Exemplo n.º 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))
Exemplo n.º 24
0
def test_round_trip(polygon: BoundPolygon) -> None:
    assert pickle_round_trip(polygon) == polygon
Exemplo n.º 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))
Exemplo n.º 26
0
def test_round_trip(edge: Edge) -> None:
    assert pickle_round_trip(edge) == edge
Exemplo n.º 27
0
def test_round_trip(leaf: Leaf) -> None:
    assert pickle_round_trip(leaf) == leaf
Exemplo n.º 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))
Exemplo n.º 29
0
def test_round_trip(segment: PortedSegment) -> None:
    assert pickle_round_trip(segment) == segment
Exemplo n.º 30
0
def test_round_trip(y_node: YNode) -> None:
    assert pickle_round_trip(y_node) == y_node