Skip to content

Commit

Permalink
Include the infinitearrays test helper only once (#356)
Browse files Browse the repository at this point in the history
* Remove pirating infinite array `oneto` methods in tests

* Include infinitearrays test helper only once
  • Loading branch information
jishnub authored Dec 3, 2024
1 parent c8f88b9 commit 9c908d6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
5 changes: 2 additions & 3 deletions test/broadcasttests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ using LazyArrays, ArrayLayouts, LinearAlgebra, FillArrays, StaticArrays, Tracker
import LazyArrays: BroadcastLayout, arguments, LazyArrayStyle, sub_materialize
import Base: broadcasted

include("infinitearrays.jl")
using .InfiniteArrays
using ..InfiniteArrays
using Infinities

@testset "Broadcasting" begin
Expand Down Expand Up @@ -418,4 +417,4 @@ using Infinities
end
end

end #module
end #module
3 changes: 1 addition & 2 deletions test/cachetests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import LazyArrays: CachedArray, CachedMatrix, CachedVector, PaddedLayout, Cached
CachedAbstractArray, CachedAbstractVector, CachedAbstractMatrix, AbstractCachedArray, AbstractCachedMatrix,
PaddedColumns

include("infinitearrays.jl")
using .InfiniteArrays
using ..InfiniteArrays
using .InfiniteArrays: OneToInf
using Infinities

Expand Down
3 changes: 0 additions & 3 deletions test/paddedtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ import ArrayLayouts: OnesLayout
import Base: setindex
using LinearAlgebra

include("infinitearrays.jl")
using .InfiniteArrays: OneToInf

# padded block arrays have padded data that is also padded. This is to test this
struct PaddedPadded <: LayoutVector{Int} end

Expand Down
4 changes: 4 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ downstream_test = "--downstream_integration_test" in ARGS
stale_deps=!downstream_test)
end

# this should only be included once to avoid method overwritten warnings, as this commites type-piracy
# we include this at the top-level, so that other sub-modules may reuse the module instead of having to include the file
include("infinitearrays.jl")

@testset "Lazy MemoryLayout" begin
@testset "ApplyArray" begin
A = [1.0 2; 3 4]
Expand Down

2 comments on commit 9c908d6

@dlfivefifty
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/120781

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v2.3.0 -m "<description of version>" 9c908d68ec035e687c867abbd2a687cf8752d6fa
git push origin v2.3.0

Please sign in to comment.