MCPcopy Create free account
hub / github.com/datasweet/datatable / TestGrowColConcat

Function TestGrowColConcat

concat_test.go:70–90  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

68}
69
70func TestGrowColConcat(t *testing.T) {
71 a, b, c := sampleForConcat(t)
72 dt, err := a.Concat(b, c)
73 assert.NoError(t, err)
74 assert.Equal(t, "magasin1", dt.Name())
75 assert.Equal(t, 10, dt.NumRows())
76
77 checkTable(t, dt,
78 "prenom", "nom", "ville", "date_naissance", "total_achat", "marge",
79 "Léon", "Dupuis", "Paris", time.Date(1983, time.March, 6, 0, 0, 0, 0, time.UTC), int64(135), nil,
80 "Marie", "Bernard", "Paris", time.Date(1993, time.July, 3, 0, 0, 0, 0, time.UTC), int64(75), nil,
81 "Sophie", "Dupond", "Marseille", time.Date(1986, time.February, 22, 0, 0, 0, 0, time.UTC), int64(27), nil,
82 "Marcel", "Martin", "Paris", time.Date(1976, time.November, 24, 0, 0, 0, 0, time.UTC), int64(39), nil,
83 "Marion", "Leroy", "Lyon", time.Date(1982, time.October, 27, 0, 0, 0, 0, time.UTC), int64(285), nil,
84 "Paul", "Moreau", "Lyon", time.Date(1976, time.April, 19, 0, 0, 0, 0, time.UTC), int64(133), nil,
85 "Marie", "Bernard", "Paris", time.Date(1993, time.July, 3, 0, 0, 0, 0, time.UTC), int64(75), nil,
86 "Marcel", "Martin", "Paris", time.Date(1976, time.November, 24, 0, 0, 0, 0, time.UTC), int64(39), nil,
87 "Marion", "Leroy", "Lyon", time.Date(1982, time.October, 27, 0, 0, 0, 0, time.UTC), nil, float64(5.2),
88 "Marie", "Bernard", "Paris", time.Date(1993, time.July, 3, 0, 0, 0, 0, time.UTC), nil, float64(0.8),
89 )
90}
91
92func TestConcatWithExpr(t *testing.T) {
93 a, b, _ := sampleForConcat(t)

Callers

nothing calls this directly

Calls 5

sampleForConcatFunction · 0.85
checkTableFunction · 0.85
NumRowsMethod · 0.80
ConcatMethod · 0.65
NameMethod · 0.65

Tested by

no test coverage detected