Skip to content

Commit 043564f

Browse files
committed
Disable progress logging in tests
1 parent 6855d4a commit 043564f

File tree

4 files changed

+8
-15
lines changed

4 files changed

+8
-15
lines changed

Project.toml

+1-3
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@ julia = "1"
2020
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
2121
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
2222
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
23-
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
2423
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
2524
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
26-
TerminalLoggers = "5d786b92-1e48-4d6f-9151-6b4477ca9bed"
2725
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2826

2927
[targets]
30-
test = ["Distances", "FillArrays", "LinearAlgebra", "Logging", "SafeTestsets", "Statistics", "TerminalLoggers", "Test"]
28+
test = ["Distances", "FillArrays", "LinearAlgebra", "SafeTestsets", "Statistics", "Test"]

test/regression.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const σ = 0.3
4141
end
4242

4343
# run elliptical slice sampler for 100 000 time steps
44-
samples = ESS_mcmc(prior, ℓ, 100_000)
44+
samples = ESS_mcmc(prior, ℓ, 100_000; progress = false)
4545

4646
# compute analytical posterior of GP
4747
posterior_Σ = prior_Σ * (I - (prior_Σ + σ^2 * I) \ prior_Σ)
@@ -66,7 +66,7 @@ end
6666
end
6767

6868
# run elliptical slice sampling for 100 000 time steps
69-
samples = ESS_mcmc(prior, ℓ, 100_000)
69+
samples = ESS_mcmc(prior, ℓ, 100_000; progress = false)
7070

7171
# compute analytical posterior
7272
posterior_μ = observations / (1 + σ^2)

test/runtests.jl

-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
using SafeTestsets
2-
using TerminalLoggers: TerminalLogger
3-
4-
using Logging: global_logger
5-
6-
global_logger(TerminalLogger())
72

83
@safetestset "Simple tests" begin include("simple.jl") end
94
@safetestset "GP regression tests" begin include("regression.jl") end

test/simple.jl

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ using Test
1818
μ = 0.8
1919
σ² = 0.2
2020

21-
samples = ESS_mcmc(prior, ℓ, 2_000)
21+
samples = ESS_mcmc(prior, ℓ, 2_000; progress = false)
2222

2323
@test mean(samples) μ atol=0.05
2424
@test var(samples) σ² atol=0.05
@@ -35,7 +35,7 @@ end
3535
μ = 0.9
3636
σ² = 0.2
3737

38-
samples = ESS_mcmc(prior, ℓ, 2_000)
38+
samples = ESS_mcmc(prior, ℓ, 2_000; progress = false)
3939

4040
@test mean(samples) μ atol=0.05
4141
@test var(samples) σ² atol=0.05
@@ -53,7 +53,7 @@ end
5353
μ = [0.8]
5454
σ² = [0.2]
5555

56-
samples = ESS_mcmc(prior, ℓ, 2_000)
56+
samples = ESS_mcmc(prior, ℓ, 2_000; progress = false)
5757

5858
@test mean(samples) μ atol=0.05
5959
@test var(samples) σ² atol=0.05
@@ -70,8 +70,8 @@ end
7070
μ = [0.9]
7171
σ² = [0.2]
7272

73-
samples = ESS_mcmc(prior, ℓ, 2_000)
73+
samples = ESS_mcmc(prior, ℓ, 2_000; progress = false)
7474

7575
@test mean(samples) μ atol=0.05
7676
@test var(samples) σ² atol=0.05
77-
end
77+
end

0 commit comments

Comments
 (0)