Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix use of test_broken on Julia 1.10 #297

Merged
merged 2 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/blue_style_formatter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
version: 1
- run: |
julia -e 'using Pkg; Pkg.add("JuliaFormatter")'
julia -e 'using JuliaFormatter; format(".", BlueStyle(); verbose=true)'
julia -e 'using JuliaFormatter; format(".", BlueStyle(); verbose=true, ignore=["test/runtests.jl"])'
- uses: reviewdog/action-suggester@v1
with:
tool_name: JuliaFormatter
Expand Down
33 changes: 24 additions & 9 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1311,12 +1311,21 @@ end
any(T -> data isa T, binary_not_implemented_types) ||
any(occursin.(binary_not_implemented_pgtypes, test_str))
)
@test_broken parsed = func(LibPQ.PQValue{oid}(result, 1, 1))
@test_broken isequal(parsed, data)
@test_broken typeof(parsed) == typeof(data)
@test_broken parsed_no_oid = func(LibPQ.PQValue(result, 1, 1))
@test_broken isequal(parsed_no_oid, data)
@test_broken typeof(parsed_no_oid) == typeof(data)
# this allows us to not care whether we error in the func call or in the tests, considering those both successful breaks
# an error will pass the outer @test_broken and skip the rest
@test_broken let
parsed = func(LibPQ.PQValue{oid}(result, 1, 1))
@test_broken isequal(parsed, data)
@test_broken typeof(parsed) == typeof(data)
# Julia 1.10+ requires @test_broken receive a boolean
false
end
@test_broken let
parsed_no_oid = func(LibPQ.PQValue(result, 1, 1))
@test_broken isequal(parsed_no_oid, data)
@test_broken typeof(parsed_no_oid) == typeof(data)
false
end
else
parsed = func(LibPQ.PQValue{oid}(result, 1, 1))
@test isequal(parsed, data)
Expand Down Expand Up @@ -1389,9 +1398,15 @@ end
any(T -> data isa T, binary_not_implemented_types) ||
any(occursin.(binary_not_implemented_pgtypes, test_str))
)
@test_broken parsed = func(LibPQ.PQValue{oid}(result, 1, 1))
@test_broken parsed == data
@test_broken typeof(parsed) == typeof(data)
# this allows us to not care whether we error in the func call or in the tests, considering those both successful breaks
# an error will pass the outer @test_broken and skip the rest
@test_broken let
parsed = func(LibPQ.PQValue{oid}(result, 1, 1))
@test_broken parsed == data
@test_broken typeof(parsed) == typeof(data)
# Julia 1.10+ requires @test_broken receive a boolean
false
end
else
parsed = func(LibPQ.PQValue{oid}(result, 1, 1))
@test parsed == data
Expand Down
Loading