import numpy as np

from kinematic_tracker.association.metric_giou_yaw import MetricGIoUYaw
from kinematic_tracker.association.metric_iou_like_two_yaw import MetricIouLikeTwoYaw
from kinematic_tracker.types import FMT

from .conftest import get_kf


def test_it(driver: MetricIouLikeTwoYaw, ref_driver: MetricGIoUYaw, ref_1z: FMT) -> None:
    """."""
    probe_z = np.array((3.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0))
    kf = get_kf(probe_z)
    ref = ref_driver.compute_metric(ref_1z, [kf])[0, 0]
    probe = driver.compute_metric(ref_1z, [kf])[0, 0]
    assert abs(probe - ref) < 6.0e-5
