Skip to content
Merged
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
11 changes: 10 additions & 1 deletion test/testsuite.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,16 @@ end
function smallset(::Type{I}, size::Int = 5, maxdim::Real = 10) where {I <: Sector}
sectors = collect(Iterators.take(values(I), 10 * size))
sectors = shuffle!(filter!(s -> dim(s) < maxdim, sectors))
return resize!(sectors, min(size, length(sectors)))
result = sectors[1:min(size, length(sectors))]
# make sure a sector with dim > 1 is included when possible, so that
# non-abelian sectors are tested consistently
if FusionStyle(I) isa MultipleFusion
i = findfirst(>(1) ∘ dim, sectors)
if !isnothing(i) && (i > length(result)) # no changes if set to have multiple fusion but actually abelian
result[end] = sectors[i]
end
end
return result
end

function randsector(::Type{I}) where {I <: Sector}
Expand Down
Loading