Skip to content

Commit d552f10

Browse files
committed
fix coverage test on nightly
Depends on JuliaLang/julia#42810 to pass. I did also observe some other test failures I couldn't really explain.
1 parent 398721d commit d552f10

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

Project.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ julia = "1"
1515
[extras]
1616
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
1717
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
18+
DiffUtils = "8294860b-85a6-42f8-8c35-d911f667b5f6"
1819
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
1920
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
2021
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
@@ -27,4 +28,4 @@ Tensors = "48a634ad-e948-5137-8d70-aa71f2a747f4"
2728
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2829

2930
[targets]
30-
test = ["Test", "Dates", "Distributed", "HTTP", "LinearAlgebra", "Mmap", "PyCall", "SHA", "SparseArrays", "Tensors", "TableReader", "DataFrames"]
31+
test = ["Test", "Dates", "DiffUtils", "Distributed", "HTTP", "LinearAlgebra", "Mmap", "PyCall", "SHA", "SparseArrays", "Tensors", "TableReader", "DataFrames"]

test/code_coverage/code_coverage.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ let
88
end
99
end
1010

11+
using DiffUtils
12+
1113
@testset "code coverage" begin
1214
out = read(`$(Base.julia_cmd()) --startup=no --project=$(dirname(dirname(@__DIR__))) --code-coverage=user
1315
$(joinpath(@__DIR__(), "coverage_example.jl"))`, String)
@@ -23,5 +25,8 @@ end
2325
cov_data = replace(cov_data, "\r\n" => "\n")
2426
expected = replace(cov_data, "\r\n" => "\n")
2527
end
28+
if cov_data != expected
29+
DiffUtils.diff(cov_data, expected)
30+
end
2631
@test cov_data == expected
2732
end

test/code_coverage/coverage_example.jl.cov

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
1 i % 3 == 0 && fizz()
88
1 i % 5 == 0 && buzz()
99
- else
10-
4 print(i, " ")
10+
3 print(i, " ")
1111
- end
12-
- end
12+
4 end
1313
1 return n
1414
- end
1515
-

0 commit comments

Comments
 (0)