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