Skip to content

Commit 626fc1f

Browse files
committed
Preemptively fix tests that are about to break
Apply these changes if JuliaLang/julia#47369 gets merged. The error message for MethodError currently applies to both calls to functions and `invoke()`, but did not specify which the error came from. Fixing this will break some tests, hence this PR.
1 parent bec020a commit 626fc1f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/src/world_age_issue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ julia> f() = size(load("indexed_image.png"))
5858
f (generic function with 1 method)
5959

6060
julia> f()
61-
ERROR: MethodError: no method matching size(::IndirectArrays.IndirectArray{ColorTypes.RGB{FixedPointNumbers.N0f8}, 2, UInt8, Matrix{UInt8}, OffsetArrays.OffsetVector{ColorTypes.RGB{FixedPointNumbers.N0f8}, Vector{ColorTypes.RGB{FixedPointNumbers.N0f8}}}})
61+
ERROR: MethodError: no method matching for call to size(::IndirectArrays.IndirectArray{ColorTypes.RGB{FixedPointNumbers.N0f8}, 2, UInt8, Matrix{UInt8}, OffsetArrays.OffsetVector{ColorTypes.RGB{FixedPointNumbers.N0f8}, Vector{ColorTypes.RGB{FixedPointNumbers.N0f8}}}})
6262
The applicable method may be too new: running in world age 32382, while current world is 32416.
6363
Closest candidates are:
6464
size(::IndirectArrays.IndirectArray) at ~/.julia/packages/IndirectArrays/BUQO3/src/IndirectArrays.jl:52 (method too new to be called from this world context.)

test/error_handling.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ add_format(format"BROKEN2", (), ".brok2", [BrokenIO2])
9191
@test isa(ex.ex, MethodError)
9292
showerror(io, ex)
9393
str = String(take!(io))
94-
@test startswith(str, "MethodError: no method matching save(::Stream{DataFormat{:BROKEN2}")
94+
@test startswith(str, "MethodError: no method matching for call to save(::Stream{DataFormat{:BROKEN2}")
9595
exw = FileIO.WriterError("BrokenIO2", "a message", ex.ex)
9696
showerror(io, exw)
9797
str = String(take!(io))

test/query.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ let file_dir = joinpath(@__DIR__, "files"), file_path = Path(file_dir)
347347
@test position(io) == 0
348348
skipmagic(io)
349349
@test position(io) == 0 # no skipping for functions
350-
# @test FileIO.detect_bedgraph(io) # MethodError: no method matching readline(::FileIO.Stream{FileIO.DataFormat{:bedGraph},IOStream}; chomp=false)
350+
# @test FileIO.detect_bedgraph(io) # MethodError: no method matching for call to readline(::FileIO.Stream{FileIO.DataFormat{:bedGraph},IOStream}; chomp=false)
351351
end
352352
open(joinpath(file_dir, "file.bedgraph")) do io
353353
@test (FileIO.detect_bedgraph(io))

0 commit comments

Comments
 (0)