From aebb90573ab688287cf703f6ed4af97f5a2be962 Mon Sep 17 00:00:00 2001 From: John Lambert Date: Sat, 10 Jul 2021 11:41:46 -0400 Subject: [PATCH] set pmin and pmax in unit test --- python/gtsam/tests/test_ShonanAveraging.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/gtsam/tests/test_ShonanAveraging.py b/python/gtsam/tests/test_ShonanAveraging.py index a873a64306..69e7055453 100644 --- a/python/gtsam/tests/test_ShonanAveraging.py +++ b/python/gtsam/tests/test_ShonanAveraging.py @@ -148,6 +148,7 @@ def test_PriorWeights(self): def test_constructorBetweenFactorPose2s(self) -> None: """Check if ShonanAveraging2 constructor works when not initialized from g2o file.""" + num_images = 11 # map (i1,i2) pair to theta in degrees that parameterizes Rot2 object i2Ri1 i2Ri1_dict = { (1, 2): -43.86342, @@ -192,9 +193,9 @@ def test_constructorBetweenFactorPose2s(self) -> None: obj = ShonanAveraging2(between_factors, shonan_params) initial = obj.initializeRandomly() - result_values, _ = obj.run(initial, p_min, self._p_max) + result_values, _ = obj.run(initial, min_p=2, max_p=10) - for i in range(11): + for i in range(num_images): wRi = result_values.atRot2(i)