Skip to content

Commit 496a701

Browse files
committed
fix gradedspace tests for product sectors including multifusion
1 parent 34a40c5 commit 496a701

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/symmetries/spaces.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ end
187187

188188
@timedtestset "ElementarySpace: $(type_repr(Vect[I]))" for I in sectorlist
189189
if Base.IteratorSize(values(I)) === Base.IsInfinite()
190-
set = unique(vcat(unit(I), [randsector(I) for k in 1:10]))
190+
set = unique(vcat(allunits(I)..., [randsector(I) for k in 1:10]))
191191
gen = (c => 2 for c in set)
192192
else
193193
gen = (values(I)[k] => (k + 1) for k in 1:length(values(I)))
@@ -227,7 +227,8 @@ end
227227
@test W == GradedSpace(dict)
228228
@test @constinferred(zerospace(V)) == GradedSpace(unit => 0 for unit in allunits(I))
229229
# randsector never returns trivial sector, so this cannot error
230-
@test_throws ArgumentError("Sector $(allunits(I)[1]) appears multiple times") GradedSpace(allunits(I)[1] => 1, randsector(I) => 0, allunits(I)[1] => 3)
230+
randunit = rand(collect(allunits(I)))
231+
@test_throws ArgumentError("Sector $(randunit) appears multiple times") GradedSpace(randunit => 1, randsector(I) => 0, randunit => 3)
231232
else
232233
W = @constinferred GradedSpace(unit(I) => 1)
233234
@test W == GradedSpace(unit(I) => 1, randsector(I) => 0)
@@ -274,7 +275,7 @@ end
274275
@test V (V, V)
275276
@test !(V (V, V))
276277
if isa(UnitStyle(I), GenericUnit)
277-
u = allunits(I)[1]
278+
u = first(allunits(I))
278279
else
279280
u = unit(I)
280281
end

0 commit comments

Comments
 (0)