From b2eb1d07a7bdaf3c17cefb3c712290357a5127e3 Mon Sep 17 00:00:00 2001 From: Carlos Paniagua Date: Mon, 16 Dec 2024 19:12:16 -0500 Subject: [PATCH] test: set random seed for consistent results --- test/test-long-tracker.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test-long-tracker.jl b/test/test-long-tracker.jl index 0a8807bc..232c3a53 100644 --- a/test/test-long-tracker.jl +++ b/test/test-long-tracker.jl @@ -49,6 +49,7 @@ begin # Load data IceFloeTracker.addfloemasks!(_props, _imgs) IceFloeTracker.addψs!(_props) IceFloeTracker.add_passtimes!(_props, _passtimes) + Random.seed!(123) IceFloeTracker.adduuid!(_props) end @@ -87,7 +88,7 @@ end # Expected: 5 trajectories, 3 of which have length 3 and 2 of which have length 2 IDs = trajectories[!, :ID] - @test IDs == [1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5] + @test IDs == [1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5] end @ntestset "Test gaps" begin @@ -106,12 +107,11 @@ end @ntestset "Case 4" begin # Add gaps to props_test_case2 props = addgaps(props_test_case2) - trajectories = IceFloeTracker.long_tracker(props, condition_thresholds, mc_thresholds) # Expected: 5 trajectories, 3 of which have length 3 and 2 of which have length 2 as in test case 2 IDs = trajectories[!, :ID] - @test IDs == [1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5] + @test IDs == [1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5] end end