def test_basic(circle_events_pair: BoundPortedCircleEventsPair,
               first_sites_pair: BoundPortedSiteEventsPair,
               second_sites_pair: BoundPortedSiteEventsPair,
               third_sites_pair: BoundPortedSiteEventsPair,
               segment_index: int,
               recompute_center_x: bool,
               recompute_center_y: bool,
               recompute_lower_x: bool) -> None:
    bound_circle_event, ported_circle_event = circle_events_pair
    first_site_bound, first_site_ported = first_sites_pair
    second_site_bound, second_site_ported = second_sites_pair
    third_site_bound, third_site_ported = third_sites_pair

    try:
        bound(bound_circle_event, first_site_bound, second_site_bound,
              third_site_bound, segment_index, recompute_center_x,
              recompute_center_y, recompute_lower_x)
    except ValueError:
        with pytest.raises(ValueError):
            ported(ported_circle_event, first_site_ported, second_site_ported,
                   third_site_ported, segment_index, recompute_center_x,
                   recompute_center_y, recompute_lower_x)
    else:
        ported(ported_circle_event, first_site_ported, second_site_ported,
               third_site_ported, segment_index, recompute_center_x,
               recompute_center_y, recompute_lower_x)

        assert are_bound_ported_circle_events_equal(bound_circle_event,
                                                    ported_circle_event)
def test_basic(circle_events_pair: BoundPortedCircleEventsPair,
               first_sites_pair: BoundPortedSiteEventsPair,
               second_sites_pair: BoundPortedSiteEventsPair,
               third_sites_pair: BoundPortedSiteEventsPair) -> None:
    bound_circle_event, ported_circle_event = circle_events_pair
    bound_first_site, ported_first_site = first_sites_pair
    bound_second_site, ported_second_site = second_sites_pair
    bound_third_site, ported_third_site = third_sites_pair

    try:
        bound(bound_circle_event, bound_first_site, bound_second_site,
              bound_third_site)
    except ValueError:
        with pytest.raises(ValueError):
            ported(ported_circle_event, ported_first_site, ported_second_site,
                   ported_third_site)
    else:
        ported(ported_circle_event, ported_first_site, ported_second_site,
               ported_third_site)

        assert are_bound_ported_circle_events_equal(bound_circle_event,
                                                    ported_circle_event)