Skip to content

Commit 8022228

Browse files
committed
add tests
1 parent bcf709c commit 8022228

6 files changed

+160
-0
lines changed

fixtures/only_null_field.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[
2+
{
3+
"a": null
4+
}
5+
]

fixtures/only_null_fields.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
table_name,field_name,field_type,field_title,count
2+
main,a,text,a,1
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
source: src/lib.rs
3+
expression: "&value"
4+
snapshot_kind: text
5+
---
6+
profile: tabular-data-package
7+
resources:
8+
- profile: tabular-data-resource
9+
name: main
10+
flatterer_name: main
11+
title: main
12+
schema:
13+
fields:
14+
- name: _link
15+
title: _link
16+
type: string
17+
format: string
18+
count: 1
19+
stats:
20+
min_len: 1
21+
max_len: 1
22+
min_str: "0"
23+
max_str: "0"
24+
count: 1
25+
empty_count: 0
26+
exact_unique: 1
27+
estimate_unique: ~
28+
top_20:
29+
- - "0"
30+
- 1
31+
sum: ~
32+
mean: ~
33+
variance: ~
34+
stddev: ~
35+
min_number: ~
36+
max_number: ~
37+
median: ~
38+
lower_quartile: ~
39+
upper_quartile: ~
40+
deciles: 0
41+
centiles: 0
42+
- name: a
43+
title: a
44+
type: boolean
45+
format: boolean
46+
count: 1
47+
stats:
48+
min_len: ~
49+
max_len: ~
50+
min_str: ~
51+
max_str: ~
52+
count: 0
53+
empty_count: 1
54+
exact_unique: ~
55+
estimate_unique: 0
56+
top_20: ~
57+
sum: ~
58+
mean: ~
59+
variance: ~
60+
stddev: ~
61+
min_number: ~
62+
max_number: ~
63+
median: ~
64+
lower_quartile: ~
65+
upper_quartile: ~
66+
deciles: 0
67+
centiles: 0
68+
primaryKey: _link
69+
path: csv/main.csv
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
source: src/lib.rs
3+
expression: "&value"
4+
snapshot_kind: text
5+
---
6+
profile: tabular-data-package
7+
resources:
8+
- profile: tabular-data-resource
9+
name: main
10+
flatterer_name: main
11+
title: main
12+
schema:
13+
fields:
14+
- name: _link
15+
title: _link
16+
type: string
17+
format: string
18+
count: 1
19+
stats:
20+
min_len: 1
21+
max_len: 1
22+
min_str: "0"
23+
max_str: "0"
24+
count: 1
25+
empty_count: 0
26+
exact_unique: 1
27+
estimate_unique: ~
28+
top_20:
29+
- - "0"
30+
- 1
31+
sum: ~
32+
mean: ~
33+
variance: ~
34+
stddev: ~
35+
min_number: ~
36+
max_number: ~
37+
median: ~
38+
lower_quartile: ~
39+
upper_quartile: ~
40+
deciles: 0
41+
centiles: 0
42+
- name: a
43+
title: a
44+
type: string
45+
format: string
46+
count: 1
47+
stats:
48+
min_len: ~
49+
max_len: ~
50+
min_str: ~
51+
max_str: ~
52+
count: 0
53+
empty_count: 1
54+
exact_unique: ~
55+
estimate_unique: 0
56+
top_20: ~
57+
sum: ~
58+
mean: ~
59+
variance: ~
60+
stddev: ~
61+
min_number: ~
62+
max_number: ~
63+
median: ~
64+
lower_quartile: ~
65+
upper_quartile: ~
66+
deciles: 0
67+
centiles: 0
68+
primaryKey: _link
69+
path: csv/main.csv
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
source: src/lib.rs
3+
expression: output
4+
snapshot_kind: text
5+
---
6+
- "table_name,field_name,field_type,field_title,count"
7+
- "main,_link,text,_link,1"
8+
- "main,a,text,a,1"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
source: src/lib.rs
3+
expression: output
4+
snapshot_kind: text
5+
---
6+
- "table_name,table_title"
7+
- "main,main"

0 commit comments

Comments
 (0)