@@ -4171,7 +4171,7 @@ end
41714171 # eachindex on DataFrame
41724172 @test combine(df, eachindex) == DataFrame(eachindex= 1 : 6 )
41734173 @test isequal_coltyped(combine(DataFrame(), eachindex),
4174- DataFrame(eachindex= Int[] ))
4174+ DataFrame(eachindex= Base . OneTo( 0 ), copycols = false ))
41754175
41764176 # Disallowed operations
41774177 @test_throws ArgumentError groupindices(df)
@@ -4248,14 +4248,16 @@ end
42484248 DataFrame(x = df. x, id = df. id, eachindex = 1 : 6 )
42494249 df = view(df, [], :)
42504250 df2 = combine(df, eachindex)
4251- @test isequal_coltyped(df2, DataFrame(eachindex = Int[] ))
4251+ @test isequal_coltyped(df2, DataFrame(eachindex = Base . OneTo( 0 ), copycols = false ))
42524252 @test isequal_coltyped(df2, combine(eachindex, df))
4253- @test isequal_coltyped(df2, rename(combine(df, eachindex => :a), :a => :eachindex))
4253+ @test isequal_coltyped(df2, rename!(combine(df, eachindex => :a), :a => :eachindex))
4254+ @test isequal_coltyped(copy(df2), rename(combine(df, eachindex => :a), :a => :eachindex))
42544255
42554256 df2 = transform(df, eachindex)
4256- @test isequal_coltyped(df2, DataFrame(x = Int[], id = Int[], eachindex = Int[] ))
4257+ @test isequal_coltyped(df2, DataFrame(x = Int[], id = Int[], eachindex = Base . OneTo( 0 ), copycols = false ))
42574258 @test isequal_coltyped(df2, transform(eachindex, df))
4258- @test isequal_coltyped(df2, rename(transform(df, eachindex => :a), :a => :eachindex))
4259+ @test isequal_coltyped(df2, rename!(transform(df, eachindex => :a), :a => :eachindex))
4260+ @test isequal_coltyped(copy(df2), rename(transform(df, eachindex => :a), :a => :eachindex))
42594261end
42604262
42614263@testset " fillfirst! correctness tests" begin
0 commit comments