Skip to content

Commit a50b25b

Browse files
authored
Merge pull request #96 from alan-turing-institute/fix-invalid-test-using-deprecated-categorical-arrays-methods
Fix invalid test that use deprecated categorical arrays methods
2 parents 8be3e11 + 6595706 commit a50b25b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/data_utils.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,11 @@ end
3434
end
3535
@testset "int-full" begin
3636
setfull()
37-
M.int(::FI, x::CategoricalValue; kw...) =
38-
collect(1:length(levels(x.pool)))[x.level]
37+
M.int(::FI, x::CategoricalValue) = CategoricalArrays.refcode(x)
3938
x = categorical(['a','b','a'])
4039
@test int(x[1]) == 0x01
4140
@test int(x[2]) == 0x02
42-
@test_broken int(x[2]) isa UInt32
41+
@test int(x[2]) isa UInt32
4342
@test int(x[1], type=Int64) == 1
4443
@test int(x[1], type=Int64) isa Int64
4544
end

0 commit comments

Comments
 (0)