Skip to content

Commit 67b432a

Browse files
committed
refactor: parameterise tests more
1 parent 77bbf55 commit 67b432a

25 files changed

Lines changed: 1022 additions & 961 deletions
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"value_counts_city": [],
3+
"value_counts_department": [],
4+
"value_counts_normalized": [],
5+
"value_counts_multi_col": [],
6+
"value_counts_multi_col_normalized": [],
7+
"groupby_single_col_sum": [],
8+
"groupby_single_col_mean": [],
9+
"groupby_single_col_count": [],
10+
"groupby_multi_col": [],
11+
"groupby_multi_agg_col": []
12+
}

tests/cli/snapshots/aggregate/aggregate_commands.json renamed to tests/cli/snapshots/aggregate/aggregate_sample_csv_file.json

Lines changed: 32 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"value_counts_city": [
3-
{
4-
"city": "LA",
5-
"count": 2
6-
},
73
{
84
"city": "NYC",
9-
"count": 2
5+
"count": 3
106
},
117
{
128
"city": "Chicago",
139
"count": 1
10+
},
11+
{
12+
"city": "LA",
13+
"count": 1
1414
}
1515
],
1616
"value_counts_department": [
@@ -20,31 +20,31 @@
2020
},
2121
{
2222
"department": "Sales",
23-
"count": 2
23+
"count": 3
2424
}
2525
],
2626
"value_counts_normalized": [
27-
{
28-
"city": "LA",
29-
"proportion": 0.4
30-
},
3127
{
3228
"city": "NYC",
33-
"proportion": 0.4
29+
"proportion": 0.6
3430
},
3531
{
3632
"city": "Chicago",
3733
"proportion": 0.2
34+
},
35+
{
36+
"city": "LA",
37+
"proportion": 0.2
3838
}
3939
],
4040
"value_counts_multi_col": [
4141
{
42-
"city": "Chicago",
42+
"city": "NYC",
4343
"department": "Engineering",
44-
"count": 1
44+
"count": 2
4545
},
4646
{
47-
"city": "LA",
47+
"city": "Chicago",
4848
"department": "Engineering",
4949
"count": 1
5050
},
@@ -53,11 +53,6 @@
5353
"department": "Sales",
5454
"count": 1
5555
},
56-
{
57-
"city": "NYC",
58-
"department": "Engineering",
59-
"count": 1
60-
},
6156
{
6257
"city": "NYC",
6358
"department": "Sales",
@@ -66,12 +61,12 @@
6661
],
6762
"value_counts_multi_col_normalized": [
6863
{
69-
"city": "Chicago",
64+
"city": "NYC",
7065
"department": "Engineering",
71-
"proportion": 0.2
66+
"proportion": 0.4
7267
},
7368
{
74-
"city": "LA",
69+
"city": "Chicago",
7570
"department": "Engineering",
7671
"proportion": 0.2
7772
},
@@ -80,11 +75,6 @@
8075
"department": "Sales",
8176
"proportion": 0.2
8277
},
83-
{
84-
"city": "NYC",
85-
"department": "Engineering",
86-
"proportion": 0.2
87-
},
8878
{
8979
"city": "NYC",
9080
"department": "Sales",
@@ -94,21 +84,21 @@
9484
"groupby_single_col_sum": [
9585
{
9686
"city": "Chicago",
97-
"salary": 70000
87+
"salary": 70000.0
9888
},
9989
{
10090
"city": "LA",
101-
"salary": 150000
91+
"salary": 0.0
10292
},
10393
{
10494
"city": "NYC",
105-
"salary": 130000
95+
"salary": 180000.0
10696
}
10797
],
10898
"groupby_single_col_mean": [
10999
{
110100
"department": "Engineering",
111-
"age": 35.0
101+
"age": 28.3333333333
112102
},
113103
{
114104
"department": "Sales",
@@ -122,7 +112,7 @@
122112
},
123113
{
124114
"city": "LA",
125-
"age": 2
115+
"age": 1
126116
},
127117
{
128118
"city": "NYC",
@@ -133,44 +123,39 @@
133123
{
134124
"city": "Chicago",
135125
"department": "Engineering",
136-
"salary": 70000
137-
},
138-
{
139-
"city": "LA",
140-
"department": "Engineering",
141-
"salary": 90000
126+
"salary": 70000.0
142127
},
143128
{
144129
"city": "LA",
145130
"department": "Sales",
146-
"salary": 60000
131+
"salary": 0.0
147132
},
148133
{
149134
"city": "NYC",
150135
"department": "Engineering",
151-
"salary": 50000
136+
"salary": 100000.0
152137
},
153138
{
154139
"city": "NYC",
155140
"department": "Sales",
156-
"salary": 80000
141+
"salary": 80000.0
157142
}
158143
],
159144
"groupby_multi_agg_col": [
160145
{
161146
"city": "Chicago",
162-
"salary": 70000,
163-
"age": 35
147+
"salary": 70000.0,
148+
"age": 35.0
164149
},
165150
{
166151
"city": "LA",
167-
"salary": 150000,
168-
"age": 75
152+
"salary": 0.0,
153+
"age": 40.0
169154
},
170155
{
171156
"city": "NYC",
172-
"salary": 130000,
173-
"age": 65
157+
"salary": 180000.0,
158+
"age": 50.0
174159
}
175160
]
176161
}

tests/cli/snapshots/filter/dropna_commands.json

Lines changed: 0 additions & 82 deletions
This file was deleted.

tests/cli/snapshots/filter/empty_filter_commands.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)