Skip to content

Commit 92e2e7c

Browse files
committed
Reject transformations on SubDataFrame with copycols=false
1 parent 20e205c commit 92e2e7c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

test/utils.jl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,17 @@ end
186186
df = DataFrame(a = [1, 2, 3], b = [1, 2, 3])
187187
v = @view df[1:2, :]
188188

189-
res = select(v, "a", "b", copycols=false)
189+
res = select(v, :a, :b, copycols=false)
190190

191191
@test size(res) == (2, 2)
192192
@test names(res) == ["a", "b"]
193-
@test res.a === [1, 2]
194-
@test res.b === [1, 2]
193+
194+
@test res.a == v.a
195+
@test res.b == v.b
196+
197+
@test parent(res.a) === parent(v.a)
198+
@test parent(res.b) === parent(v.b)
195199
end
196200

197201

202+

0 commit comments

Comments
 (0)