Skip to content

Commit

Permalink
Add test for predict with measurements for DistanceHypothesiser
Browse files Browse the repository at this point in the history
  • Loading branch information
sdhiscocks committed Oct 2, 2024
1 parent 5f5d627 commit fc2adb2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions stonesoup/hypothesiser/tests/test_distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import datetime

import numpy as np
import pytest

from ..distance import DistanceHypothesiser
from ...types.detection import Detection
Expand All @@ -10,7 +11,8 @@
from ... import measures


def test_mahalanobis(predictor, updater):
@pytest.mark.parametrize('predict_with_measurements', [True, False])
def test_mahalanobis(predictor, updater, predict_with_measurements):

timestamp = datetime.datetime.now()
track = Track([GaussianState(np.array([[0]]), np.array([[1]]), timestamp)])
Expand All @@ -21,7 +23,8 @@ def test_mahalanobis(predictor, updater):

measure = measures.Mahalanobis()
hypothesiser = DistanceHypothesiser(
predictor, updater, measure=measure, missed_distance=3)
predictor, updater, measure=measure, missed_distance=3,
predict_with_measurements=predict_with_measurements)

hypotheses = hypothesiser.hypothesise(track, detections, timestamp)

Expand Down

0 comments on commit fc2adb2

Please sign in to comment.