@@ -10,16 +10,16 @@ include("test_source_without_length.jl")
1010 @test_throws ArgumentError TableTraitsUtils. create_columns_from_iterabletable (nothing , errorhandling= :error )
1111 @test TableTraitsUtils. create_columns_from_iterabletable (nothing , errorhandling= :returnvalue ) === nothing
1212
13- @test_throws ArgumentError TableTraitsUtils. create_columns_from_iterabletable ([1 ,2 , 3 ])
14- @test_throws ArgumentError TableTraitsUtils. create_columns_from_iterabletable ([1 ,2 , 3 ], errorhandling= :error )
15- @test TableTraitsUtils. create_columns_from_iterabletable ([1 ,2 , 3 ], errorhandling= :returnvalue ) === nothing
13+ @test_throws ArgumentError TableTraitsUtils. create_columns_from_iterabletable ([1 , 2 , 3 ])
14+ @test_throws ArgumentError TableTraitsUtils. create_columns_from_iterabletable ([1 , 2 , 3 ], errorhandling= :error )
15+ @test TableTraitsUtils. create_columns_from_iterabletable ([1 , 2 , 3 ], errorhandling= :returnvalue ) === nothing
1616
17- @test_throws ArgumentError TableTraitsUtils. create_columns_from_iterabletable (Iterators. filter (i -> true , [1 ,2 , 3 ]))
18- @test_throws ArgumentError TableTraitsUtils. create_columns_from_iterabletable (Iterators. filter (i -> true , [1 ,2 , 3 ]), errorhandling= :error )
19- @test TableTraitsUtils. create_columns_from_iterabletable (Iterators. filter (i -> true , [1 ,2 , 3 ]), errorhandling= :returnvalue ) === nothing
17+ @test_throws ArgumentError TableTraitsUtils. create_columns_from_iterabletable (Iterators. filter (i -> true , [1 , 2 , 3 ]))
18+ @test_throws ArgumentError TableTraitsUtils. create_columns_from_iterabletable (Iterators. filter (i -> true , [1 , 2 , 3 ]), errorhandling= :error )
19+ @test TableTraitsUtils. create_columns_from_iterabletable (Iterators. filter (i -> true , [1 , 2 , 3 ]), errorhandling= :returnvalue ) === nothing
2020
21- @test create_columns_from_iterabletable (NamedTuple{(:a , :b ),Tuple{Int,String}}[]) == (Any[Int[],String[]], [:a ,:b ])
22- @test create_columns_from_iterabletable ((i for i in NamedTuple{(:a , :b ),Tuple{Int,String}}[])) == (Any[Int[],String[]], [:a ,:b ])
21+ @test create_columns_from_iterabletable (NamedTuple{(:a , :b ),Tuple{Int,String}}[]) == (Any[Int[], String[]], [:a , :b ])
22+ @test create_columns_from_iterabletable ((i for i in NamedTuple{(:a , :b ),Tuple{Int,String}}[])) == (Any[Int[], String[]], [:a , :b ])
2323
2424 @test_throws ArgumentError create_columns_from_iterabletable (Int[])
2525 @test_throws ArgumentError create_columns_from_iterabletable (Int[], errorhandling= :error )
@@ -28,7 +28,7 @@ include("test_source_without_length.jl")
2828 @test_throws ArgumentError create_columns_from_iterabletable ((i for i in Int[]), errorhandling= :error )
2929 @test create_columns_from_iterabletable ((i for i in Int[]), errorhandling= :returnvalue ) === nothing
3030
31- columns = (Int[1 ,2 , 3 ], Float64[1. , 2. , 3. ], String[" John" , " Sally" , " Drew" ])
31+ columns = (Int[1 , 2 , 3 ], Float64[1.0 , 2.0 , 3.0 ], String[" John" , " Sally" , " Drew" ])
3232 names = [:children , :age , :name ]
3333
3434 it = TableTraitsUtils. create_tableiterator (columns, names)
@@ -37,7 +37,7 @@ include("test_source_without_length.jl")
3737
3838 columns3, names3 = TableTraitsUtils. create_columns_from_iterabletable (it, sel_cols= :all )
3939
40- columns23, names23 = TableTraitsUtils. create_columns_from_iterabletable (it, sel_cols= [2 ,3 ])
40+ columns23, names23 = TableTraitsUtils. create_columns_from_iterabletable (it, sel_cols= [2 , 3 ])
4141
4242 @test columns[1 ] == columns2[1 ] == columns3[1 ]
4343 @test columns[2 ] == columns2[2 ] == columns3[2 ]
@@ -50,48 +50,48 @@ include("test_source_without_length.jl")
5050 @test names == names2 == names3
5151 @test names[2 : 3 ] == names23
5252
53- @test isequal (create_columns_from_iterabletable ([(a = DataValue {Any} (), b = DataValue {Int} ())], na_representation= :missing ),
54- ([Any[missing ], Union{Missing,Int}[missing ]], [:a , :b ])
55- )
53+ @test isequal (create_columns_from_iterabletable ([(a= DataValue {Any} (), b= DataValue {Int} ())], na_representation= :missing ),
54+ ([Any[missing ], Union{Missing,Int}[missing ]], [:a , :b ])
55+ )
5656
57- @test create_columns_from_iterabletable ([(a = DataValue {Any} (), b = DataValue {Int} ())], na_representation= :datavalue ) ==
58- ([DataValue{Any}[NA], DataValue{Int}[NA]], [:a , :b ])
57+ @test create_columns_from_iterabletable ([(a= DataValue {Any} (), b= DataValue {Int} ())], na_representation= :datavalue ) ==
58+ ([DataValue{Any}[NA], DataValue{Int}[NA]], [:a , :b ])
5959
6060 it2 = TestSourceWithoutLength ()
6161
6262 columns4, names4 = TableTraitsUtils. create_columns_from_iterabletable (it2)
63- @test columns4[1 ] == [1 ,2 ]
64- @test columns4[2 ] == [1. , 2. ]
63+ @test columns4[1 ] == [1 , 2 ]
64+ @test columns4[2 ] == [1.0 , 2.0 ]
6565 @test names4 == [:a , :b ]
6666
6767 columns5, names5 = TableTraitsUtils. create_columns_from_iterabletable (it2, sel_cols= :all )
68- @test columns5[1 ] == [1 ,2 ]
69- @test columns5[2 ] == [1. , 2. ]
68+ @test columns5[1 ] == [1 , 2 ]
69+ @test columns5[2 ] == [1.0 , 2.0 ]
7070 @test names5 == [:a , :b ]
7171
7272 columns6, names6 = TableTraitsUtils. create_columns_from_iterabletable (it2, sel_cols= [2 ])
73- @test columns6[1 ] == [1. , 2. ]
73+ @test columns6[1 ] == [1.0 , 2.0 ]
7474 @test names6 == [:b ]
7575
76- columns_with_nulls = (Union{Int,Missing}[3 , 2 , missing ], Float64[2. , 5. , 9. ], Union{String,Missing}[" a" , missing , " b" ])
76+ columns_with_nulls = (Union{Int,Missing}[3 , 2 , missing ], Float64[2.0 , 5.0 , 9.0 ], Union{String,Missing}[" a" , missing , " b" ])
7777 it3 = TableTraitsUtils. create_tableiterator (columns_with_nulls, names)
7878
7979 columns7, names7 = TableTraitsUtils. create_columns_from_iterabletable (it3)
8080
81- @test columns7[1 ] == [3 ,2 , NA]
82- @test columns7[2 ] == [2. , 5. , 9. ]
83- @test columns7[3 ] == [" a" ,NA," b" ]
81+ @test columns7[1 ] == [3 , 2 , NA]
82+ @test columns7[2 ] == [2.0 , 5.0 , 9.0 ]
83+ @test columns7[3 ] == [" a" , NA, " b" ]
8484 @test length (columns7) == 3
8585 @test names7 == names
8686
87- columns_with_DV = ([3 , 2 , NA], [2. , 5. , 9. ], [" a" , NA, " b" ])
87+ columns_with_DV = ([3 , 2 , NA], [2.0 , 5.0 , 9.0 ], [" a" , NA, " b" ])
8888 it4 = TableTraitsUtils. create_tableiterator (columns_with_DV, names)
8989
9090 columns8, names8 = TableTraitsUtils. create_columns_from_iterabletable (it4)
9191
92- @test columns8[1 ] == [3 ,2 , NA]
93- @test columns8[2 ] == [2. , 5. , 9. ]
94- @test columns8[3 ] == [" a" ,NA," b" ]
92+ @test columns8[1 ] == [3 , 2 , NA]
93+ @test columns8[2 ] == [2.0 , 5.0 , 9.0 ]
94+ @test columns8[3 ] == [" a" , NA, " b" ]
9595 @test length (columns8) == 3
9696 @test names8 == names
9797
0 commit comments