diff --git a/test/resample.jl b/test/resample.jl index 72040c9..90b249d 100644 --- a/test/resample.jl +++ b/test/resample.jl @@ -23,7 +23,7 @@ @test new_lml_est ≈ old_lml_est # Test resampling with invalid weights - with_logger(Logging.SimpleLogger(Logging.Error)) do + with_logger(Logging.SimpleLogger(stderr, Logging.Error)) do state = pf_initialize(line_model, (0,), slope_choicemap(-3), 100) @test_throws ErrorException pf_multinomial_resample!(state, check=true) state = pf_multinomial_resample!(state, check=false) @@ -70,7 +70,7 @@ end @test new_lml_est ≈ old_lml_est # Test resampling with invalid weights - with_logger(Logging.SimpleLogger(Logging.Error)) do + with_logger(Logging.SimpleLogger(stderr, Logging.Error)) do state = pf_initialize(line_model, (0,), slope_choicemap(-3), 100) @test_throws ErrorException pf_residual_resample!(state, check=true) state = pf_residual_resample!(state, check=false) @@ -119,7 +119,7 @@ end @test new_lml_est ≈ old_lml_est # Test resampling with invalid weights - with_logger(Logging.SimpleLogger(Logging.Error)) do + with_logger(Logging.SimpleLogger(stderr, Logging.Error)) do state = pf_initialize(line_model, (0,), slope_choicemap(-3), 100) @test_throws ErrorException pf_stratified_resample!(state, check=true) state = pf_stratified_resample!(state, check=false) diff --git a/test/resize.jl b/test/resize.jl index 06223ce..95b7b0a 100644 --- a/test/resize.jl +++ b/test/resize.jl @@ -29,7 +29,7 @@ end # Test resampling with invalid weights - with_logger(Logging.SimpleLogger(Logging.Error)) do + with_logger(Logging.SimpleLogger(stderr, Logging.Error)) do state = pf_initialize(line_model, (0,), slope_choicemap(-3), 100) @test_throws ErrorException pf_multinomial_resize!(state, 50, check=true) state = pf_multinomial_resize!(state, 50, check=false) @@ -75,7 +75,7 @@ end end # Test resampling with invalid weights - with_logger(Logging.SimpleLogger(Logging.Error)) do + with_logger(Logging.SimpleLogger(stderr, Logging.Error)) do state = pf_initialize(line_model, (0,), slope_choicemap(-3), 100) @test_throws ErrorException pf_residual_resize!(state, 50, check=true) state = pf_residual_resize!(state, 50, check=false) @@ -105,7 +105,7 @@ end end # Test resampling with invalid weights - with_logger(Logging.SimpleLogger(Logging.Error)) do + with_logger(Logging.SimpleLogger(stderr, Logging.Error)) do state = pf_initialize(line_model, (0,), slope_choicemap(-3), 100) @test_throws ErrorException pf_optimal_resize!(state, 50, check=true) state = pf_optimal_resize!(state, 50, check=false)