From 0ac3a896964898e44b04044de9fe661d48bbc1db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bogumi=C5=82=20Kami=C5=84ski?= Date: Sat, 14 Oct 2023 20:47:44 +0200 Subject: [PATCH] add a test --- test/iteration.jl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/iteration.jl b/test/iteration.jl index 7b8290c50..a2eb3a329 100644 --- a/test/iteration.jl +++ b/test/iteration.jl @@ -86,6 +86,11 @@ end @test mapcols(x -> 2x, df, cols=Int) == DataFrame(a1=[2, 4], a2=[4, 6], b=[6, 8]) @test mapcols(x -> 2x, df, cols=Not(All())) == DataFrame(a1=[1, 2], a2=[2, 3], b=[3, 4]) @test mapcols(x -> 2x, df, cols=:) == DataFrame(a1=[2, 4], a2=[4, 6], b=[6, 8]) + + df2 = mapcols(x -> 2x, df, cols="b") + @test df2.a1 == df.a && df2.a1 !== df.a + @test df2.a2 == df.a && df2.a2 !== df.a + @test df2.b == 2*df.b end @testset "mapcols!" begin