Skip to content

Commit 747f664

Browse files
authored
Fix failing tests (#281)
* Fix failing tests The problem seems to have been that when testing the "lib/*" packages we `Pkg.develop("ArrayInterface")` which would pull from github in the ".ci/test.yml". Instead we do this `Pkg.develop(Pkg.PackageSpec(path="."))` to ensure each PR's changes are used in testing.
1 parent 2f5c63d commit 747f664

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

.ci/test.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ Pkg.update()
1818

1919
# All packages need the core
2020
dev_subpkg("ArrayInterfaceCore")
21-
Pkg.develop("ArrayInterface")
21+
Pkg.develop(Pkg.PackageSpec(path="."))
2222

23-
Pkg.test("ArrayInterface"; coverage=true)
23+
Pkg.test("ArrayInterface"; coverage=true)

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ArrayInterface"
22
uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
3-
version = "6.0.4"
3+
version = "6.0.5"
44

55
[deps]
66
ArrayInterfaceCore = "30b0a656-2188-435a-8636-2ec0e6a096e2"

lib/ArrayInterfaceOffsetArrays/test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ o = OffsetArray(vec(A), 8);
2727
@test @inferred(ArrayInterface.device(OffsetArray(zeros(2,2,2),8,-2,-5))) === ArrayInterface.CPUPointer()
2828

2929
offset_view = @view OffsetArrays.centered(zeros(eltype(A), 5, 5))[:, begin]; # SubArray of OffsetArray
30-
@test @inferred(ArrayInterface.known_offsets(offset_view)) == (-2,)
30+
@test @inferred(ArrayInterface.offsets(offset_view)) == (-2,)
3131

src/axes.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ end
4040
function axes_types(::Type{T}) where {T<:PermutedDimsArray}
4141
eachop_tuple(field_type, to_parent_dims(T), axes_types(parent_type(T)))
4242
end
43+
axes_types(::Type{<:Base.Slice{I}}) where {I} = Tuple{Base.IdentityUnitRange{I}}
4344
function axes_types(::Type{T}) where {T<:AbstractRange}
4445
if known_length(T) === nothing
4546
return Tuple{OneTo{Int}}

src/size.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ known_size(x) = known_size(typeof(x))
8989
function known_size(::Type{T}) where {T<:AbstractRange}
9090
(_range_length(known_first(T), known_step(T), known_last(T)),)
9191
end
92+
known_size(::Type{<:Base.IdentityUnitRange{I}}) where {I} = known_size(I)
9293
known_size(::Type{<:Base.Generator{I}}) where {I} = known_size(I)
9394
known_size(::Type{<:Iterators.Reverse{I}}) where {I} = known_size(I)
9495
known_size(::Type{<:Iterators.Enumerate{I}}) where {I} = known_size(I)

test/runtests.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ for g in groups
4040
include("dimensions.jl")
4141
include("indexing.jl")
4242
include("ranges.jl")
43-
include("setup.jl")
4443
include("size.jl")
4544
include("misc.jl")
4645
else
@@ -50,4 +49,4 @@ for g in groups
5049
end
5150
end
5251

53-
end
52+
end

0 commit comments

Comments
 (0)