diff --git a/src/utils.jl b/src/utils.jl index 8203eb1f..38940529 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -6,36 +6,6 @@ function askwargs(flag::Bool) return NamedTuple() end -struct LazyTestResult - label::String - message::String - pass::Bool -end - -ispass(result::LazyTestResult) = result.pass - -# Infix operator wrapping `ispass` so that the failure case is pretty-printed -⊜(result, yes::Bool) = ispass(result)::Bool == yes - -# To be shown via `@test` when failed: -function Base.show(io::IO, result::LazyTestResult) - print(io, "⟪result: ") - show(io, MIME"text/plain"(), result) - print(io, "⟫") -end - -function Base.show(io::IO, ::MIME"text/plain", result::LazyTestResult) - if ispass(result) - printstyled(io, "✔ PASS"; color = :green, bold = true) - else - printstyled(io, "😭 FAILED"; color = :red, bold = true) - end - println(io, ": ", result.label) - for line in eachline(IOBuffer(result.message)) - println(io, " "^4, line) - end -end - function project_toml_path(dir) candidates = joinpath.(dir, ["Project.toml", "JuliaProject.toml"]) i = findfirst(isfile, candidates) diff --git a/test/test_project_extras.jl b/test/test_project_extras.jl index 4cd53a24..a0041593 100644 --- a/test/test_project_extras.jl +++ b/test/test_project_extras.jl @@ -1,7 +1,7 @@ module TestProjectExtras include("preamble.jl") -using Aqua: is_julia12_or_later, ispass, ⊜ +using Aqua: is_julia12_or_later using Base: PkgId, UUID @testset "is_julia12_or_later" begin diff --git a/test/test_stale_deps.jl b/test/test_stale_deps.jl index c748eb4d..9ec84b01 100644 --- a/test/test_stale_deps.jl +++ b/test/test_stale_deps.jl @@ -2,7 +2,7 @@ module TestStaleDeps include("preamble.jl") using Base: PkgId, UUID -using Aqua: find_stale_deps_2, ispass, ⊜ +using Aqua: find_stale_deps_2 @testset "find_stale_deps_2" begin pkg = PkgId(UUID(42), "TargetPkg")