Example #1
0
def test_basic(sources_pair: Tuple[BoundPoint, PortedPoint],
               targets_pair: Tuple[BoundPoint, PortedPoint]) -> None:
    bound_source, ported_source = sources_pair
    bound_target, ported_target = targets_pair

    bound, ported = (BoundSegment(bound_source, bound_target),
                     PortedSegment(ported_source, ported_target))

    assert are_bound_ported_points_equal(bound.source, ported.source)
    assert are_bound_ported_points_equal(bound.target, ported.target)
Example #2
0
def test_basic(points_pair: BoundPortedPointsPair) -> None:
    bound, ported = points_pair

    assert are_bound_ported_points_equal(bound.round(), ported.round())
Example #3
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))
Example #4
0
def test_deep(points_pair: Tuple[BoundPoint, PortedPoint]) -> None:
    bound, ported = points_pair

    assert are_bound_ported_points_equal(copy.deepcopy(bound),
                                         copy.deepcopy(ported))
Example #5
0
def test_shallow(points_pair: BoundPortedPointsPair) -> None:
    bound, ported = points_pair

    assert are_bound_ported_points_equal(copy.copy(bound), copy.copy(ported))
Example #6
0
def test_basic(x: float, y: float) -> None:
    bound, ported = BoundPoint(x, y), PortedPoint(x, y)

    assert are_bound_ported_points_equal(bound, ported)
Example #7
0
def test_basic(segments_pair: Tuple[BoundSegment, PortedSegment]) -> None:
    bound, ported = segments_pair

    assert are_bound_ported_points_equal(bound.max, ported.max)
def test_basic(pair: BoundPortedSiteEventsPair) -> None:
    bound, ported = pair

    assert are_bound_ported_points_equal(bound.comparison_point,
                                         ported.comparison_point)