1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-25 00:37:31 +02:00

add csv parser tests

This commit is contained in:
Kelly Brazil
2020-03-02 15:05:56 -08:00
parent b4c3714ced
commit ce184d4d57
20 changed files with 24054 additions and 0 deletions

20
tests/fixtures/generic/csv-biostats.csv vendored Normal file
View File

@ -0,0 +1,20 @@
"Name", "Sex", "Age", "Height (in)", "Weight (lbs)"
"Alex", "M", 41, 74, 170
"Bert", "M", 42, 68, 166
"Carl", "M", 32, 70, 155
"Dave", "M", 39, 72, 167
"Elly", "F", 30, 66, 124
"Fran", "F", 33, 66, 115
"Gwen", "F", 26, 64, 121
"Hank", "M", 30, 71, 158
"Ivan", "M", 53, 72, 175
"Jake", "M", 32, 69, 143
"Kate", "F", 47, 69, 139
"Luke", "M", 34, 72, 163
"Myra", "F", 23, 62, 98
"Neil", "M", 36, 75, 160
"Omar", "M", 38, 70, 145
"Page", "F", 31, 67, 135
"Quin", "M", 29, 71, 176
"Ruth", "F", 28, 65, 131
1 Name Sex Age Height (in) Weight (lbs)
2 Alex M 41 74 170
3 Bert M 42 68 166
4 Carl M 32 70 155
5 Dave M 39 72 167
6 Elly F 30 66 124
7 Fran F 33 66 115
8 Gwen F 26 64 121
9 Hank M 30 71 158
10 Ivan M 53 72 175
11 Jake M 32 69 143
12 Kate F 47 69 139
13 Luke M 34 72 163
14 Myra F 23 62 98
15 Neil M 36 75 160
16 Omar M 38 70 145
17 Page F 31 67 135
18 Quin M 29 71 176
19 Ruth F 28 65 131

View File

@ -0,0 +1 @@
[{"Name": "Alex", "Sex": "M", "Age": "41", "Height (in)": "74", "Weight (lbs)": "170"}, {"Name": "Bert", "Sex": "M", "Age": "42", "Height (in)": "68", "Weight (lbs)": "166"}, {"Name": "Carl", "Sex": "M", "Age": "32", "Height (in)": "70", "Weight (lbs)": "155"}, {"Name": "Dave", "Sex": "M", "Age": "39", "Height (in)": "72", "Weight (lbs)": "167"}, {"Name": "Elly", "Sex": "F", "Age": "30", "Height (in)": "66", "Weight (lbs)": "124"}, {"Name": "Fran", "Sex": "F", "Age": "33", "Height (in)": "66", "Weight (lbs)": "115"}, {"Name": "Gwen", "Sex": "F", "Age": "26", "Height (in)": "64", "Weight (lbs)": "121"}, {"Name": "Hank", "Sex": "M", "Age": "30", "Height (in)": "71", "Weight (lbs)": "158"}, {"Name": "Ivan", "Sex": "M", "Age": "53", "Height (in)": "72", "Weight (lbs)": "175"}, {"Name": "Jake", "Sex": "M", "Age": "32", "Height (in)": "69", "Weight (lbs)": "143"}, {"Name": "Kate", "Sex": "F", "Age": "47", "Height (in)": "69", "Weight (lbs)": "139"}, {"Name": "Luke", "Sex": "M", "Age": "34", "Height (in)": "72", "Weight (lbs)": "163"}, {"Name": "Myra", "Sex": "F", "Age": "23", "Height (in)": "62", "Weight (lbs)": "98"}, {"Name": "Neil", "Sex": "M", "Age": "36", "Height (in)": "75", "Weight (lbs)": "160"}, {"Name": "Omar", "Sex": "M", "Age": "38", "Height (in)": "70", "Weight (lbs)": "145"}, {"Name": "Page", "Sex": "F", "Age": "31", "Height (in)": "67", "Weight (lbs)": "135"}, {"Name": "Quin", "Sex": "M", "Age": "29", "Height (in)": "71", "Weight (lbs)": "176"}, {"Name": "Ruth", "Sex": "F", "Age": "28", "Height (in)": "65", "Weight (lbs)": "131"}]

130
tests/fixtures/generic/csv-cities.csv vendored Normal file
View File

@ -0,0 +1,130 @@
"LatD", "LatM", "LatS", "NS", "LonD", "LonM", "LonS", "EW", "City", "State"
41, 5, 59, "N", 80, 39, 0, "W", "Youngstown", OH
42, 52, 48, "N", 97, 23, 23, "W", "Yankton", SD
46, 35, 59, "N", 120, 30, 36, "W", "Yakima", WA
42, 16, 12, "N", 71, 48, 0, "W", "Worcester", MA
43, 37, 48, "N", 89, 46, 11, "W", "Wisconsin Dells", WI
36, 5, 59, "N", 80, 15, 0, "W", "Winston-Salem", NC
49, 52, 48, "N", 97, 9, 0, "W", "Winnipeg", MB
39, 11, 23, "N", 78, 9, 36, "W", "Winchester", VA
34, 14, 24, "N", 77, 55, 11, "W", "Wilmington", NC
39, 45, 0, "N", 75, 33, 0, "W", "Wilmington", DE
48, 9, 0, "N", 103, 37, 12, "W", "Williston", ND
41, 15, 0, "N", 77, 0, 0, "W", "Williamsport", PA
37, 40, 48, "N", 82, 16, 47, "W", "Williamson", WV
33, 54, 0, "N", 98, 29, 23, "W", "Wichita Falls", TX
37, 41, 23, "N", 97, 20, 23, "W", "Wichita", KS
40, 4, 11, "N", 80, 43, 12, "W", "Wheeling", WV
26, 43, 11, "N", 80, 3, 0, "W", "West Palm Beach", FL
47, 25, 11, "N", 120, 19, 11, "W", "Wenatchee", WA
41, 25, 11, "N", 122, 23, 23, "W", "Weed", CA
31, 13, 11, "N", 82, 20, 59, "W", "Waycross", GA
44, 57, 35, "N", 89, 38, 23, "W", "Wausau", WI
42, 21, 36, "N", 87, 49, 48, "W", "Waukegan", IL
44, 54, 0, "N", 97, 6, 36, "W", "Watertown", SD
43, 58, 47, "N", 75, 55, 11, "W", "Watertown", NY
42, 30, 0, "N", 92, 20, 23, "W", "Waterloo", IA
41, 32, 59, "N", 73, 3, 0, "W", "Waterbury", CT
38, 53, 23, "N", 77, 1, 47, "W", "Washington", DC
41, 50, 59, "N", 79, 8, 23, "W", "Warren", PA
46, 4, 11, "N", 118, 19, 48, "W", "Walla Walla", WA
31, 32, 59, "N", 97, 8, 23, "W", "Waco", TX
38, 40, 48, "N", 87, 31, 47, "W", "Vincennes", IN
28, 48, 35, "N", 97, 0, 36, "W", "Victoria", TX
32, 20, 59, "N", 90, 52, 47, "W", "Vicksburg", MS
49, 16, 12, "N", 123, 7, 12, "W", "Vancouver", BC
46, 55, 11, "N", 98, 0, 36, "W", "Valley City", ND
30, 49, 47, "N", 83, 16, 47, "W", "Valdosta", GA
43, 6, 36, "N", 75, 13, 48, "W", "Utica", NY
39, 54, 0, "N", 79, 43, 48, "W", "Uniontown", PA
32, 20, 59, "N", 95, 18, 0, "W", "Tyler", TX
42, 33, 36, "N", 114, 28, 12, "W", "Twin Falls", ID
33, 12, 35, "N", 87, 34, 11, "W", "Tuscaloosa", AL
34, 15, 35, "N", 88, 42, 35, "W", "Tupelo", MS
36, 9, 35, "N", 95, 54, 36, "W", "Tulsa", OK
32, 13, 12, "N", 110, 58, 12, "W", "Tucson", AZ
37, 10, 11, "N", 104, 30, 36, "W", "Trinidad", CO
40, 13, 47, "N", 74, 46, 11, "W", "Trenton", NJ
44, 45, 35, "N", 85, 37, 47, "W", "Traverse City", MI
43, 39, 0, "N", 79, 22, 47, "W", "Toronto", ON
39, 2, 59, "N", 95, 40, 11, "W", "Topeka", KS
41, 39, 0, "N", 83, 32, 24, "W", "Toledo", OH
33, 25, 48, "N", 94, 3, 0, "W", "Texarkana", TX
39, 28, 12, "N", 87, 24, 36, "W", "Terre Haute", IN
27, 57, 0, "N", 82, 26, 59, "W", "Tampa", FL
30, 27, 0, "N", 84, 16, 47, "W", "Tallahassee", FL
47, 14, 24, "N", 122, 25, 48, "W", "Tacoma", WA
43, 2, 59, "N", 76, 9, 0, "W", "Syracuse", NY
32, 35, 59, "N", 82, 20, 23, "W", "Swainsboro", GA
33, 55, 11, "N", 80, 20, 59, "W", "Sumter", SC
40, 59, 24, "N", 75, 11, 24, "W", "Stroudsburg", PA
37, 57, 35, "N", 121, 17, 24, "W", "Stockton", CA
44, 31, 12, "N", 89, 34, 11, "W", "Stevens Point", WI
40, 21, 36, "N", 80, 37, 12, "W", "Steubenville", OH
40, 37, 11, "N", 103, 13, 12, "W", "Sterling", CO
38, 9, 0, "N", 79, 4, 11, "W", "Staunton", VA
39, 55, 11, "N", 83, 48, 35, "W", "Springfield", OH
37, 13, 12, "N", 93, 17, 24, "W", "Springfield", MO
42, 5, 59, "N", 72, 35, 23, "W", "Springfield", MA
39, 47, 59, "N", 89, 39, 0, "W", "Springfield", IL
47, 40, 11, "N", 117, 24, 36, "W", "Spokane", WA
41, 40, 48, "N", 86, 15, 0, "W", "South Bend", IN
43, 32, 24, "N", 96, 43, 48, "W", "Sioux Falls", SD
42, 29, 24, "N", 96, 23, 23, "W", "Sioux City", IA
32, 30, 35, "N", 93, 45, 0, "W", "Shreveport", LA
33, 38, 23, "N", 96, 36, 36, "W", "Sherman", TX
44, 47, 59, "N", 106, 57, 35, "W", "Sheridan", WY
35, 13, 47, "N", 96, 40, 48, "W", "Seminole", OK
32, 25, 11, "N", 87, 1, 11, "W", "Selma", AL
38, 42, 35, "N", 93, 13, 48, "W", "Sedalia", MO
47, 35, 59, "N", 122, 19, 48, "W", "Seattle", WA
41, 24, 35, "N", 75, 40, 11, "W", "Scranton", PA
41, 52, 11, "N", 103, 39, 36, "W", "Scottsbluff", NB
42, 49, 11, "N", 73, 56, 59, "W", "Schenectady", NY
32, 4, 48, "N", 81, 5, 23, "W", "Savannah", GA
46, 29, 24, "N", 84, 20, 59, "W", "Sault Sainte Marie", MI
27, 20, 24, "N", 82, 31, 47, "W", "Sarasota", FL
38, 26, 23, "N", 122, 43, 12, "W", "Santa Rosa", CA
35, 40, 48, "N", 105, 56, 59, "W", "Santa Fe", NM
34, 25, 11, "N", 119, 41, 59, "W", "Santa Barbara", CA
33, 45, 35, "N", 117, 52, 12, "W", "Santa Ana", CA
37, 20, 24, "N", 121, 52, 47, "W", "San Jose", CA
37, 46, 47, "N", 122, 25, 11, "W", "San Francisco", CA
41, 27, 0, "N", 82, 42, 35, "W", "Sandusky", OH
32, 42, 35, "N", 117, 9, 0, "W", "San Diego", CA
34, 6, 36, "N", 117, 18, 35, "W", "San Bernardino", CA
29, 25, 12, "N", 98, 30, 0, "W", "San Antonio", TX
31, 27, 35, "N", 100, 26, 24, "W", "San Angelo", TX
40, 45, 35, "N", 111, 52, 47, "W", "Salt Lake City", UT
38, 22, 11, "N", 75, 35, 59, "W", "Salisbury", MD
36, 40, 11, "N", 121, 39, 0, "W", "Salinas", CA
38, 50, 24, "N", 97, 36, 36, "W", "Salina", KS
38, 31, 47, "N", 106, 0, 0, "W", "Salida", CO
44, 56, 23, "N", 123, 1, 47, "W", "Salem", OR
44, 57, 0, "N", 93, 5, 59, "W", "Saint Paul", MN
38, 37, 11, "N", 90, 11, 24, "W", "Saint Louis", MO
39, 46, 12, "N", 94, 50, 23, "W", "Saint Joseph", MO
42, 5, 59, "N", 86, 28, 48, "W", "Saint Joseph", MI
44, 25, 11, "N", 72, 1, 11, "W", "Saint Johnsbury", VT
45, 34, 11, "N", 94, 10, 11, "W", "Saint Cloud", MN
29, 53, 23, "N", 81, 19, 11, "W", "Saint Augustine", FL
43, 25, 48, "N", 83, 56, 24, "W", "Saginaw", MI
38, 35, 24, "N", 121, 29, 23, "W", "Sacramento", CA
43, 36, 36, "N", 72, 58, 12, "W", "Rutland", VT
33, 24, 0, "N", 104, 31, 47, "W", "Roswell", NM
35, 56, 23, "N", 77, 48, 0, "W", "Rocky Mount", NC
41, 35, 24, "N", 109, 13, 48, "W", "Rock Springs", WY
42, 16, 12, "N", 89, 5, 59, "W", "Rockford", IL
43, 9, 35, "N", 77, 36, 36, "W", "Rochester", NY
44, 1, 12, "N", 92, 27, 35, "W", "Rochester", MN
37, 16, 12, "N", 79, 56, 24, "W", "Roanoke", VA
37, 32, 24, "N", 77, 26, 59, "W", "Richmond", VA
39, 49, 48, "N", 84, 53, 23, "W", "Richmond", IN
38, 46, 12, "N", 112, 5, 23, "W", "Richfield", UT
45, 38, 23, "N", 89, 25, 11, "W", "Rhinelander", WI
39, 31, 12, "N", 119, 48, 35, "W", "Reno", NV
50, 25, 11, "N", 104, 39, 0, "W", "Regina", SA
40, 10, 48, "N", 122, 14, 23, "W", "Red Bluff", CA
40, 19, 48, "N", 75, 55, 48, "W", "Reading", PA
41, 9, 35, "N", 81, 14, 23, "W", "Ravenna", OH
1 LatD LatM LatS NS LonD LonM LonS EW City State
2 41 5 59 N 80 39 0 W Youngstown OH
3 42 52 48 N 97 23 23 W Yankton SD
4 46 35 59 N 120 30 36 W Yakima WA
5 42 16 12 N 71 48 0 W Worcester MA
6 43 37 48 N 89 46 11 W Wisconsin Dells WI
7 36 5 59 N 80 15 0 W Winston-Salem NC
8 49 52 48 N 97 9 0 W Winnipeg MB
9 39 11 23 N 78 9 36 W Winchester VA
10 34 14 24 N 77 55 11 W Wilmington NC
11 39 45 0 N 75 33 0 W Wilmington DE
12 48 9 0 N 103 37 12 W Williston ND
13 41 15 0 N 77 0 0 W Williamsport PA
14 37 40 48 N 82 16 47 W Williamson WV
15 33 54 0 N 98 29 23 W Wichita Falls TX
16 37 41 23 N 97 20 23 W Wichita KS
17 40 4 11 N 80 43 12 W Wheeling WV
18 26 43 11 N 80 3 0 W West Palm Beach FL
19 47 25 11 N 120 19 11 W Wenatchee WA
20 41 25 11 N 122 23 23 W Weed CA
21 31 13 11 N 82 20 59 W Waycross GA
22 44 57 35 N 89 38 23 W Wausau WI
23 42 21 36 N 87 49 48 W Waukegan IL
24 44 54 0 N 97 6 36 W Watertown SD
25 43 58 47 N 75 55 11 W Watertown NY
26 42 30 0 N 92 20 23 W Waterloo IA
27 41 32 59 N 73 3 0 W Waterbury CT
28 38 53 23 N 77 1 47 W Washington DC
29 41 50 59 N 79 8 23 W Warren PA
30 46 4 11 N 118 19 48 W Walla Walla WA
31 31 32 59 N 97 8 23 W Waco TX
32 38 40 48 N 87 31 47 W Vincennes IN
33 28 48 35 N 97 0 36 W Victoria TX
34 32 20 59 N 90 52 47 W Vicksburg MS
35 49 16 12 N 123 7 12 W Vancouver BC
36 46 55 11 N 98 0 36 W Valley City ND
37 30 49 47 N 83 16 47 W Valdosta GA
38 43 6 36 N 75 13 48 W Utica NY
39 39 54 0 N 79 43 48 W Uniontown PA
40 32 20 59 N 95 18 0 W Tyler TX
41 42 33 36 N 114 28 12 W Twin Falls ID
42 33 12 35 N 87 34 11 W Tuscaloosa AL
43 34 15 35 N 88 42 35 W Tupelo MS
44 36 9 35 N 95 54 36 W Tulsa OK
45 32 13 12 N 110 58 12 W Tucson AZ
46 37 10 11 N 104 30 36 W Trinidad CO
47 40 13 47 N 74 46 11 W Trenton NJ
48 44 45 35 N 85 37 47 W Traverse City MI
49 43 39 0 N 79 22 47 W Toronto ON
50 39 2 59 N 95 40 11 W Topeka KS
51 41 39 0 N 83 32 24 W Toledo OH
52 33 25 48 N 94 3 0 W Texarkana TX
53 39 28 12 N 87 24 36 W Terre Haute IN
54 27 57 0 N 82 26 59 W Tampa FL
55 30 27 0 N 84 16 47 W Tallahassee FL
56 47 14 24 N 122 25 48 W Tacoma WA
57 43 2 59 N 76 9 0 W Syracuse NY
58 32 35 59 N 82 20 23 W Swainsboro GA
59 33 55 11 N 80 20 59 W Sumter SC
60 40 59 24 N 75 11 24 W Stroudsburg PA
61 37 57 35 N 121 17 24 W Stockton CA
62 44 31 12 N 89 34 11 W Stevens Point WI
63 40 21 36 N 80 37 12 W Steubenville OH
64 40 37 11 N 103 13 12 W Sterling CO
65 38 9 0 N 79 4 11 W Staunton VA
66 39 55 11 N 83 48 35 W Springfield OH
67 37 13 12 N 93 17 24 W Springfield MO
68 42 5 59 N 72 35 23 W Springfield MA
69 39 47 59 N 89 39 0 W Springfield IL
70 47 40 11 N 117 24 36 W Spokane WA
71 41 40 48 N 86 15 0 W South Bend IN
72 43 32 24 N 96 43 48 W Sioux Falls SD
73 42 29 24 N 96 23 23 W Sioux City IA
74 32 30 35 N 93 45 0 W Shreveport LA
75 33 38 23 N 96 36 36 W Sherman TX
76 44 47 59 N 106 57 35 W Sheridan WY
77 35 13 47 N 96 40 48 W Seminole OK
78 32 25 11 N 87 1 11 W Selma AL
79 38 42 35 N 93 13 48 W Sedalia MO
80 47 35 59 N 122 19 48 W Seattle WA
81 41 24 35 N 75 40 11 W Scranton PA
82 41 52 11 N 103 39 36 W Scottsbluff NB
83 42 49 11 N 73 56 59 W Schenectady NY
84 32 4 48 N 81 5 23 W Savannah GA
85 46 29 24 N 84 20 59 W Sault Sainte Marie MI
86 27 20 24 N 82 31 47 W Sarasota FL
87 38 26 23 N 122 43 12 W Santa Rosa CA
88 35 40 48 N 105 56 59 W Santa Fe NM
89 34 25 11 N 119 41 59 W Santa Barbara CA
90 33 45 35 N 117 52 12 W Santa Ana CA
91 37 20 24 N 121 52 47 W San Jose CA
92 37 46 47 N 122 25 11 W San Francisco CA
93 41 27 0 N 82 42 35 W Sandusky OH
94 32 42 35 N 117 9 0 W San Diego CA
95 34 6 36 N 117 18 35 W San Bernardino CA
96 29 25 12 N 98 30 0 W San Antonio TX
97 31 27 35 N 100 26 24 W San Angelo TX
98 40 45 35 N 111 52 47 W Salt Lake City UT
99 38 22 11 N 75 35 59 W Salisbury MD
100 36 40 11 N 121 39 0 W Salinas CA
101 38 50 24 N 97 36 36 W Salina KS
102 38 31 47 N 106 0 0 W Salida CO
103 44 56 23 N 123 1 47 W Salem OR
104 44 57 0 N 93 5 59 W Saint Paul MN
105 38 37 11 N 90 11 24 W Saint Louis MO
106 39 46 12 N 94 50 23 W Saint Joseph MO
107 42 5 59 N 86 28 48 W Saint Joseph MI
108 44 25 11 N 72 1 11 W Saint Johnsbury VT
109 45 34 11 N 94 10 11 W Saint Cloud MN
110 29 53 23 N 81 19 11 W Saint Augustine FL
111 43 25 48 N 83 56 24 W Saginaw MI
112 38 35 24 N 121 29 23 W Sacramento CA
113 43 36 36 N 72 58 12 W Rutland VT
114 33 24 0 N 104 31 47 W Roswell NM
115 35 56 23 N 77 48 0 W Rocky Mount NC
116 41 35 24 N 109 13 48 W Rock Springs WY
117 42 16 12 N 89 5 59 W Rockford IL
118 43 9 35 N 77 36 36 W Rochester NY
119 44 1 12 N 92 27 35 W Rochester MN
120 37 16 12 N 79 56 24 W Roanoke VA
121 37 32 24 N 77 26 59 W Richmond VA
122 39 49 48 N 84 53 23 W Richmond IN
123 38 46 12 N 112 5 23 W Richfield UT
124 45 38 23 N 89 25 11 W Rhinelander WI
125 39 31 12 N 119 48 35 W Reno NV
126 50 25 11 N 104 39 0 W Regina SA
127 40 10 48 N 122 14 23 W Red Bluff CA
128 40 19 48 N 75 55 48 W Reading PA
129 41 9 35 N 81 14 23 W Ravenna OH

File diff suppressed because one or more lines are too long

89
tests/fixtures/generic/csv-deniro.csv vendored Normal file
View File

@ -0,0 +1,89 @@
"Year", "Score", "Title"
1968, 86, "Greetings"
1970, 17, "Bloody Mama"
1970, 73, "Hi, Mom!"
1971, 40, "Born to Win"
1973, 98, "Mean Streets"
1973, 88, "Bang the Drum Slowly"
1974, 97, "The Godfather, Part II"
1976, 41, "The Last Tycoon"
1976, 99, "Taxi Driver"
1977, 47, "1900"
1977, 67, "New York, New York"
1978, 93, "The Deer Hunter"
1980, 97, "Raging Bull"
1981, 75, "True Confessions"
1983, 90, "The King of Comedy"
1984, 89, "Once Upon a Time in America"
1984, 60, "Falling in Love"
1985, 98, "Brazil"
1986, 65, "The Mission"
1987, 100, "Dear America: Letters Home From Vietnam"
1987, 80, "The Untouchables"
1987, 78, "Angel Heart"
1988, 96, "Midnight Run"
1989, 64, "Jacknife"
1989, 47, "We're No Angels"
1990, 88, "Awakenings"
1990, 29, "Stanley & Iris"
1990, 96, "Goodfellas"
1991, 76, "Cape Fear"
1991, 69, "Mistress"
1991, 65, "Guilty by Suspicion"
1991, 71, "Backdraft"
1992, 87, "Thunderheart"
1992, 67, "Night and the City"
1993, 75, "This Boy's Life"
1993, 78, "Mad Dog and Glory"
1993, 96, "A Bronx Tale"
1994, 39, "Mary Shelley's Frankenstein"
1995, 80, "Casino"
1995, 86, "Heat"
1996, 74, "Sleepers"
1996, 38, "The Fan"
1996, 80, "Marvin's Room"
1997, 85, "Wag the Dog"
1997, 87, "Jackie Brown"
1997, 72, "Cop Land"
1998, 68, "Ronin"
1998, 38, "Great Expectations"
1999, 69, "Analyze This"
1999, 43, "Flawless"
2000, 43, "The Adventures of Rocky & Bullwinkle"
2000, 84, "Meet the Parents"
2000, 41, "Men of Honor"
2001, 73, "The Score"
2001, 33, "15 Minutes"
2002, 48, "City by the Sea"
2002, 27, "Analyze That"
2003, 4, "Godsend"
2004, 35, "Shark Tale"
2004, 38, "Meet the Fockers"
2005, 4, "The Bridge of San Luis Rey"
2005, 46, "Rent"
2005, 13, "Hide and Seek"
2006, 54, "The Good Shepherd"
2007, 21, "Arthur and the Invisibles"
2007, 76, "Captain Shakespeare"
2008, 19, "Righteous Kill"
2008, 51, "What Just Happened?"
2009, 46, "Everybody's Fine"
2010, 72, "Machete"
2010, 10, "Little Fockers"
2010, 50, "Stone"
2011, 25, "Killer Elite"
2011, 7, "New Year's Eve"
2011, 70, "Limitless"
2012, 92, "Silver Linings Playbook"
2012, 51, "Being Flynn"
2012, 29, "Red Lights"
2013, 46, "Last Vegas"
2013, 7, "The Big Wedding"
2013, 29, "Grudge Match"
2013, 11, "Killing Season"
2014, 9, "The Bag Man"
2015, 60, "Joy"
2015, 26, "Heist"
2015, 61, "The Intern"
2016, 11, "Dirty Grandpa"
1 Year Score Title
2 1968 86 Greetings
3 1970 17 Bloody Mama
4 1970 73 Hi, Mom!
5 1971 40 Born to Win
6 1973 98 Mean Streets
7 1973 88 Bang the Drum Slowly
8 1974 97 The Godfather, Part II
9 1976 41 The Last Tycoon
10 1976 99 Taxi Driver
11 1977 47 1900
12 1977 67 New York, New York
13 1978 93 The Deer Hunter
14 1980 97 Raging Bull
15 1981 75 True Confessions
16 1983 90 The King of Comedy
17 1984 89 Once Upon a Time in America
18 1984 60 Falling in Love
19 1985 98 Brazil
20 1986 65 The Mission
21 1987 100 Dear America: Letters Home From Vietnam
22 1987 80 The Untouchables
23 1987 78 Angel Heart
24 1988 96 Midnight Run
25 1989 64 Jacknife
26 1989 47 We're No Angels
27 1990 88 Awakenings
28 1990 29 Stanley & Iris
29 1990 96 Goodfellas
30 1991 76 Cape Fear
31 1991 69 Mistress
32 1991 65 Guilty by Suspicion
33 1991 71 Backdraft
34 1992 87 Thunderheart
35 1992 67 Night and the City
36 1993 75 This Boy's Life
37 1993 78 Mad Dog and Glory
38 1993 96 A Bronx Tale
39 1994 39 Mary Shelley's Frankenstein
40 1995 80 Casino
41 1995 86 Heat
42 1996 74 Sleepers
43 1996 38 The Fan
44 1996 80 Marvin's Room
45 1997 85 Wag the Dog
46 1997 87 Jackie Brown
47 1997 72 Cop Land
48 1998 68 Ronin
49 1998 38 Great Expectations
50 1999 69 Analyze This
51 1999 43 Flawless
52 2000 43 The Adventures of Rocky & Bullwinkle
53 2000 84 Meet the Parents
54 2000 41 Men of Honor
55 2001 73 The Score
56 2001 33 15 Minutes
57 2002 48 City by the Sea
58 2002 27 Analyze That
59 2003 4 Godsend
60 2004 35 Shark Tale
61 2004 38 Meet the Fockers
62 2005 4 The Bridge of San Luis Rey
63 2005 46 Rent
64 2005 13 Hide and Seek
65 2006 54 The Good Shepherd
66 2007 21 Arthur and the Invisibles
67 2007 76 Captain Shakespeare
68 2008 19 Righteous Kill
69 2008 51 What Just Happened?
70 2009 46 Everybody's Fine
71 2010 72 Machete
72 2010 10 Little Fockers
73 2010 50 Stone
74 2011 25 Killer Elite
75 2011 7 New Year's Eve
76 2011 70 Limitless
77 2012 92 Silver Linings Playbook
78 2012 51 Being Flynn
79 2012 29 Red Lights
80 2013 46 Last Vegas
81 2013 7 The Big Wedding
82 2013 29 Grudge Match
83 2013 11 Killing Season
84 2014 9 The Bag Man
85 2015 60 Joy
86 2015 26 Heist
87 2015 61 The Intern
88 2016 11 Dirty Grandpa

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
TOK,UPDATE,DATE,SHOT,TIME,AUXHEAT,PHASE,STATE,PGASA,PGASZ,BGASA,BGASZ,BGASA2,BGASZ2,PIMPA,PIMPZ,PELLET,RGEO,RMAG,AMIN,SEPLIM,XPLIM,KAPPA,DELTA,INDENT,AREA,VOL,CONFIG,IGRADB,WALMAT,DIVMAT,LIMMAT,EVAP,BT,IP,VSURF,Q95,BEPMHD,BETMHD,BEPDIA,NEL,DNELDT,ZEFF,PRAD,POHM,ENBI,PINJ,BSOURCE,PINJ2,BSOURCE2,COCTR,PNBI,ECHFREQ,ECHMODE,ECHLOC,PECH,ICFREQ,ICSCHEME,ICANTEN,PICRH,LHFREQ,LHNPAR,PLH,IBWFREQ,PIBW,TE0,TI0,WFANI,WFICRH,MEFF,ISEQ,WTH,WTOT,DWTOT,PL,PLTH,TAUTOT,TAUTH
JET,20031201,20001006,53521,1.000E+01,NBIC,HSELM,TRANS,2.000E+00,1.000E+00,2,1,0,0,1.658E+01,8.152E+00,NONE,2.888E+00,3.047E+00,9.807E-01,2.924E-02,7.304E-02,1.572E+00,1.781E-01,0.000E+00,4.572E+00,8.161E+01,LSN,1,IN/C,BE,C/BE,BE,3.598E+00,2.000E+06,1.013E-01,6.001E+00,1.053E+00,9.252E-01,1.128E+00,3.106E+19,3.106E+19,6.612E+00,4.515E+06,5.122E+04,1.000E+05,1.466E+07,771706,0.000E+00,652114,1.000E+00,1.420E+07,-9.999E-09,NONE,NONE,0.000E+00,5.100E+07,HMIN,MONOPOLE,4.027E+06,3.700E+09,1.840E+00,2.000E+06,-9.999E-09,0.000E+00,9.295E+03,1.373E+04,6.913E-01,7.319E+05,2.000E+00,NONE,3.715E+06,5.381E+06,1.282E+06,1.297E+07,1.210E+07,4.445E-01,2.194E-01
1 TOK UPDATE DATE SHOT TIME AUXHEAT PHASE STATE PGASA PGASZ BGASA BGASZ BGASA2 BGASZ2 PIMPA PIMPZ PELLET RGEO RMAG AMIN SEPLIM XPLIM KAPPA DELTA INDENT AREA VOL CONFIG IGRADB WALMAT DIVMAT LIMMAT EVAP BT IP VSURF Q95 BEPMHD BETMHD BEPDIA NEL DNELDT ZEFF PRAD POHM ENBI PINJ BSOURCE PINJ2 BSOURCE2 COCTR PNBI ECHFREQ ECHMODE ECHLOC PECH ICFREQ ICSCHEME ICANTEN PICRH LHFREQ LHNPAR PLH IBWFREQ PIBW TE0 TI0 WFANI WFICRH MEFF ISEQ WTH WTOT DWTOT PL PLTH TAUTOT TAUTH
2 JET 20031201 20001006 53521 1.000E+01 NBIC HSELM TRANS 2.000E+00 1.000E+00 2 1 0 0 1.658E+01 8.152E+00 NONE 2.888E+00 3.047E+00 9.807E-01 2.924E-02 7.304E-02 1.572E+00 1.781E-01 0.000E+00 4.572E+00 8.161E+01 LSN 1 IN/C BE C/BE BE 3.598E+00 2.000E+06 1.013E-01 6.001E+00 1.053E+00 9.252E-01 1.128E+00 3.106E+19 3.106E+19 6.612E+00 4.515E+06 5.122E+04 1.000E+05 1.466E+07 771706 0.000E+00 652114 1.000E+00 1.420E+07 -9.999E-09 NONE NONE 0.000E+00 5.100E+07 HMIN MONOPOLE 4.027E+06 3.700E+09 1.840E+00 2.000E+06 -9.999E-09 0.000E+00 9.295E+03 1.373E+04 6.913E-01 7.319E+05 2.000E+00 NONE 3.715E+06 5.381E+06 1.282E+06 1.297E+07 1.210E+07 4.445E-01 2.194E-01

View File

@ -0,0 +1 @@
[{"TOK": "JET", "UPDATE": "20031201", "DATE": "20001006", "SHOT": "53521", "TIME": "1.000E+01", "AUXHEAT": "NBIC", "PHASE": "HSELM", "STATE": "TRANS", "PGASA": "2.000E+00", "PGASZ": "1.000E+00", "BGASA": "2", "BGASZ": "1", "BGASA2": "0", "BGASZ2": "0", "PIMPA": "1.658E+01", "PIMPZ": "8.152E+00", "PELLET": "NONE", "RGEO": "2.888E+00", "RMAG": "3.047E+00", "AMIN": "9.807E-01", "SEPLIM": "2.924E-02", "XPLIM": "7.304E-02", "KAPPA": "1.572E+00", "DELTA": "1.781E-01", "INDENT": "0.000E+00", "AREA": "4.572E+00", "VOL": "8.161E+01", "CONFIG": "LSN", "IGRADB": "1", "WALMAT": "IN/C", "DIVMAT": "BE", "LIMMAT": "C/BE", "EVAP": "BE", "BT": "3.598E+00", "IP": "2.000E+06", "VSURF": "1.013E-01", "Q95": "6.001E+00", "BEPMHD": "1.053E+00", "BETMHD": "9.252E-01", "BEPDIA": "1.128E+00", "NEL": "3.106E+19", "DNELDT": "3.106E+19", "ZEFF": "6.612E+00", "PRAD": "4.515E+06", "POHM": "5.122E+04", "ENBI": "1.000E+05", "PINJ": "1.466E+07", "BSOURCE": "771706", "PINJ2": "0.000E+00", "BSOURCE2": "652114", "COCTR": "1.000E+00", "PNBI": "1.420E+07", "ECHFREQ": "-9.999E-09", "ECHMODE": "NONE", "ECHLOC": "NONE", "PECH": "0.000E+00", "ICFREQ": "5.100E+07", "ICSCHEME": "HMIN", "ICANTEN": "MONOPOLE", "PICRH": "4.027E+06", "LHFREQ": "3.700E+09", "LHNPAR": "1.840E+00", "PLH": "2.000E+06", "IBWFREQ": "-9.999E-09", "PIBW": "0.000E+00", "TE0": "9.295E+03", "TI0": "1.373E+04", "WFANI": "6.913E-01", "WFICRH": "7.319E+05", "MEFF": "2.000E+00", "ISEQ": "NONE", "WTH": "3.715E+06", "WTOT": "5.381E+06", "DWTOT": "1.282E+06", "PL": "1.297E+07", "PLTH": "1.210E+07", "TAUTOT": "4.445E-01", "TAUTH": "2.194E-01"}]

File diff suppressed because one or more lines are too long

11767
tests/fixtures/generic/csv-flyrna.tsv vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

11767
tests/fixtures/generic/csv-flyrna2.tsv vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,3 @@
"Sell"| "List"| "Living"| "Rooms"| "Beds"| "Baths"| "Age"| "Acres"| "Taxes"
142| 160| 28| 10| 5| 3| 60| 0.28| 3167
175| 180| 18| 8| 4| 1| 12| 0.43| 4033
1 Sell List Living Rooms Beds Baths Age Acres Taxes
2 142 160 28 10 5 3 60 0.28 3167
3 175 180 18 8 4 1 12 0.43 4033

View File

@ -0,0 +1 @@
[{"Sell": "142", "List": "160", "Living": "28", "Rooms": "10", "Beds": "5", "Baths": "3", "Age": "60", "Acres": "0.28", "Taxes": "3167"}, {"Sell": "175", "List": "180", "Living": "18", "Rooms": "8", "Beds": "4", "Baths": "1", "Age": "12", "Acres": "0.43", "Taxes": "4033"}]

51
tests/fixtures/generic/csv-homes.csv vendored Normal file
View File

@ -0,0 +1,51 @@
"Sell", "List", "Living", "Rooms", "Beds", "Baths", "Age", "Acres", "Taxes"
142, 160, 28, 10, 5, 3, 60, 0.28, 3167
175, 180, 18, 8, 4, 1, 12, 0.43, 4033
129, 132, 13, 6, 3, 1, 41, 0.33, 1471
138, 140, 17, 7, 3, 1, 22, 0.46, 3204
232, 240, 25, 8, 4, 3, 5, 2.05, 3613
135, 140, 18, 7, 4, 3, 9, 0.57, 3028
150, 160, 20, 8, 4, 3, 18, 4.00, 3131
207, 225, 22, 8, 4, 2, 16, 2.22, 5158
271, 285, 30, 10, 5, 2, 30, 0.53, 5702
89, 90, 10, 5, 3, 1, 43, 0.30, 2054
153, 157, 22, 8, 3, 3, 18, 0.38, 4127
87, 90, 16, 7, 3, 1, 50, 0.65, 1445
234, 238, 25, 8, 4, 2, 2, 1.61, 2087
106, 116, 20, 8, 4, 1, 13, 0.22, 2818
175, 180, 22, 8, 4, 2, 15, 2.06, 3917
165, 170, 17, 8, 4, 2, 33, 0.46, 2220
166, 170, 23, 9, 4, 2, 37, 0.27, 3498
136, 140, 19, 7, 3, 1, 22, 0.63, 3607
148, 160, 17, 7, 3, 2, 13, 0.36, 3648
151, 153, 19, 8, 4, 2, 24, 0.34, 3561
180, 190, 24, 9, 4, 2, 10, 1.55, 4681
293, 305, 26, 8, 4, 3, 6, 0.46, 7088
167, 170, 20, 9, 4, 2, 46, 0.46, 3482
190, 193, 22, 9, 5, 2, 37, 0.48, 3920
184, 190, 21, 9, 5, 2, 27, 1.30, 4162
157, 165, 20, 8, 4, 2, 7, 0.30, 3785
110, 115, 16, 8, 4, 1, 26, 0.29, 3103
135, 145, 18, 7, 4, 1, 35, 0.43, 3363
567, 625, 64, 11, 4, 4, 4, 0.85, 12192
180, 185, 20, 8, 4, 2, 11, 1.00, 3831
183, 188, 17, 7, 3, 2, 16, 3.00, 3564
185, 193, 20, 9, 3, 2, 56, 6.49, 3765
152, 155, 17, 8, 4, 1, 33, 0.70, 3361
148, 153, 13, 6, 3, 2, 22, 0.39, 3950
152, 159, 15, 7, 3, 1, 25, 0.59, 3055
146, 150, 16, 7, 3, 1, 31, 0.36, 2950
170, 190, 24, 10, 3, 2, 33, 0.57, 3346
127, 130, 20, 8, 4, 1, 65, 0.40, 3334
265, 270, 36, 10, 6, 3, 33, 1.20, 5853
157, 163, 18, 8, 4, 2, 12, 1.13, 3982
128, 135, 17, 9, 4, 1, 25, 0.52, 3374
110, 120, 15, 8, 4, 2, 11, 0.59, 3119
123, 130, 18, 8, 4, 2, 43, 0.39, 3268
212, 230, 39, 12, 5, 3, 202, 4.29, 3648
145, 145, 18, 8, 4, 2, 44, 0.22, 2783
129, 135, 10, 6, 3, 1, 15, 1.00, 2438
143, 145, 21, 7, 4, 2, 10, 1.20, 3529
247, 252, 29, 9, 4, 2, 4, 1.25, 4626
111, 120, 15, 8, 3, 1, 97, 1.11, 3205
133, 145, 26, 7, 3, 1, 42, 0.36, 3059
1 Sell List Living Rooms Beds Baths Age Acres Taxes
2 142 160 28 10 5 3 60 0.28 3167
3 175 180 18 8 4 1 12 0.43 4033
4 129 132 13 6 3 1 41 0.33 1471
5 138 140 17 7 3 1 22 0.46 3204
6 232 240 25 8 4 3 5 2.05 3613
7 135 140 18 7 4 3 9 0.57 3028
8 150 160 20 8 4 3 18 4.00 3131
9 207 225 22 8 4 2 16 2.22 5158
10 271 285 30 10 5 2 30 0.53 5702
11 89 90 10 5 3 1 43 0.30 2054
12 153 157 22 8 3 3 18 0.38 4127
13 87 90 16 7 3 1 50 0.65 1445
14 234 238 25 8 4 2 2 1.61 2087
15 106 116 20 8 4 1 13 0.22 2818
16 175 180 22 8 4 2 15 2.06 3917
17 165 170 17 8 4 2 33 0.46 2220
18 166 170 23 9 4 2 37 0.27 3498
19 136 140 19 7 3 1 22 0.63 3607
20 148 160 17 7 3 2 13 0.36 3648
21 151 153 19 8 4 2 24 0.34 3561
22 180 190 24 9 4 2 10 1.55 4681
23 293 305 26 8 4 3 6 0.46 7088
24 167 170 20 9 4 2 46 0.46 3482
25 190 193 22 9 5 2 37 0.48 3920
26 184 190 21 9 5 2 27 1.30 4162
27 157 165 20 8 4 2 7 0.30 3785
28 110 115 16 8 4 1 26 0.29 3103
29 135 145 18 7 4 1 35 0.43 3363
30 567 625 64 11 4 4 4 0.85 12192
31 180 185 20 8 4 2 11 1.00 3831
32 183 188 17 7 3 2 16 3.00 3564
33 185 193 20 9 3 2 56 6.49 3765
34 152 155 17 8 4 1 33 0.70 3361
35 148 153 13 6 3 2 22 0.39 3950
36 152 159 15 7 3 1 25 0.59 3055
37 146 150 16 7 3 1 31 0.36 2950
38 170 190 24 10 3 2 33 0.57 3346
39 127 130 20 8 4 1 65 0.40 3334
40 265 270 36 10 6 3 33 1.20 5853
41 157 163 18 8 4 2 12 1.13 3982
42 128 135 17 9 4 1 25 0.52 3374
43 110 120 15 8 4 2 11 0.59 3119
44 123 130 18 8 4 2 43 0.39 3268
45 212 230 39 12 5 3 202 4.29 3648
46 145 145 18 8 4 2 44 0.22 2783
47 129 135 10 6 3 1 15 1.00 2438
48 143 145 21 7 4 2 10 1.20 3529
49 247 252 29 9 4 2 4 1.25 4626
50 111 120 15 8 3 1 97 1.11 3205
51 133 145 26 7 3 1 42 0.36 3059

1
tests/fixtures/generic/csv-homes.json vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,91 @@
"Index", "Year", "Age", "Name", "Movie"
1, 1928, 44, "Emil Jannings", "The Last Command, The Way of All Flesh"
2, 1929, 41, "Warner Baxter", "In Old Arizona"
3, 1930, 62, "George Arliss", "Disraeli"
4, 1931, 53, "Lionel Barrymore", "A Free Soul"
5, 1932, 47, "Wallace Beery", "The Champ"
6, 1933, 35, "Fredric March", "Dr. Jekyll and Mr. Hyde"
7, 1934, 34, "Charles Laughton", "The Private Life of Henry VIII"
8, 1935, 34, "Clark Gable", "It Happened One Night"
9, 1936, 49, "Victor McLaglen", "The Informer"
10, 1937, 41, "Paul Muni", "The Story of Louis Pasteur"
11, 1938, 37, "Spencer Tracy", "Captains Courageous"
12, 1939, 38, "Spencer Tracy", "Boys Town"
13, 1940, 34, "Robert Donat", "Goodbye, Mr. Chips"
14, 1941, 32, "James Stewart", "The Philadelphia Story"
15, 1942, 40, "Gary Cooper", "Sergeant York"
16, 1943, 43, "James Cagney", "Yankee Doodle Dandy"
17, 1944, 48, "Paul Lukas", "Watch on the Rhine"
18, 1945, 41, "Bing Crosby", "Going My Way"
19, 1946, 39, "Ray Milland", "The Lost Weekend"
20, 1947, 49, "Fredric March", "The Best Years of Our Lives"
21, 1948, 57, "Ronald Colman", "A Double Life"
22, 1949, 41, "Laurence Olivier", "Hamlet"
23, 1950, 38, "Broderick Crawford", "All the King's Men"
24, 1951, 39, "José Ferrer", "Cyrano de Bergerac"
25, 1952, 52, "Humphrey Bogart", "The African Queen"
26, 1953, 51, "Gary Cooper", "High Noon"
27, 1954, 35, "William Holden", "Stalag 17"
28, 1955, 30, "Marlon Brando", "On the Waterfront"
29, 1956, 39, "Ernest Borgnine", "Marty"
30, 1957, 36, "Yul Brynner", "The King and I"
31, 1958, 43, "Alec Guinness", "The Bridge on the River Kwai"
32, 1959, 49, "David Niven", "Separate Tables"
33, 1960, 36, "Charlton Heston", "Ben-Hur"
34, 1961, 47, "Burt Lancaster", "Elmer Gantry"
35, 1962, 31, "Maximilian Schell", "Judgment at Nuremberg"
36, 1963, 47, "Gregory Peck", "To Kill a Mockingbird"
37, 1964, 37, "Sidney Poitier", "Lilies of the Field"
38, 1965, 57, "Rex Harrison", "My Fair Lady"
39, 1966, 42, "Lee Marvin", "Cat Ballou"
40, 1967, 45, "Paul Scofield", "A Man for All Seasons"
41, 1968, 42, "Rod Steiger", "In the Heat of the Night"
42, 1969, 45, "Cliff Robertson", "Charly"
43, 1970, 62, "John Wayne", "True Grit"
44, 1971, 43, "George C. Scott", "Patton"
45, 1972, 42, "Gene Hackman", "The French Connection"
46, 1973, 48, "Marlon Brando", "The Godfather"
47, 1974, 49, "Jack Lemmon", "Save the Tiger"
48, 1975, 56, "Art Carney", "Harry and Tonto"
49, 1976, 38, "Jack Nicholson", "One Flew Over the Cuckoo's Nest"
50, 1977, 60, "Peter Finch", "Network"
51, 1978, 30, "Richard Dreyfuss", "The Goodbye Girl"
52, 1979, 40, "Jon Voight", "Coming Home"
53, 1980, 42, "Dustin Hoffman", "Kramer vs. Kramer"
54, 1981, 37, "Robert De Niro", "Raging Bull"
55, 1982, 76, "Henry Fonda", "On Golden Pond"
56, 1983, 39, "Ben Kingsley", "Gandhi"
57, 1984, 53, "Robert Duvall", "Tender Mercies"
58, 1985, 45, "F. Murray Abraham", "Amadeus"
59, 1986, 36, "William Hurt", "Kiss of the Spider Woman"
60, 1987, 62, "Paul Newman", "The Color of Money"
61, 1988, 43, "Michael Douglas", "Wall Street"
62, 1989, 51, "Dustin Hoffman", "Rain Man"
63, 1990, 32, "Daniel Day-Lewis", "My Left Foot"
64, 1991, 42, "Jeremy Irons", "Reversal of Fortune"
65, 1992, 54, "Anthony Hopkins", "The Silence of the Lambs"
66, 1993, 52, "Al Pacino", "Scent of a Woman"
67, 1994, 37, "Tom Hanks", "Philadelphia"
68, 1995, 38, "Tom Hanks", "Forrest Gump"
69, 1996, 32, "Nicolas Cage", "Leaving Las Vegas"
70, 1997, 45, "Geoffrey Rush", "Shine"
71, 1998, 60, "Jack Nicholson", "As Good as It Gets"
72, 1999, 46, "Roberto Benigni", "Life Is Beautiful"
73, 2000, 40, "Kevin Spacey", "American Beauty"
74, 2001, 36, "Russell Crowe", "Gladiator"
75, 2002, 47, "Denzel Washington", "Training Day"
76, 2003, 29, "Adrien Brody", "The Pianist"
77, 2004, 43, "Sean Penn", "Mystic River"
78, 2005, 37, "Jamie Foxx", "Ray"
79, 2006, 38, "Philip Seymour Hoffman", "Capote"
80, 2007, 45, "Forest Whitaker", "The Last King of Scotland"
81, 2008, 50, "Daniel Day-Lewis", "There Will Be Blood"
82, 2009, 48, "Sean Penn", "Milk"
83, 2010, 60, "Jeff Bridges", "Crazy Heart"
84, 2011, 50, "Colin Firth", "The King's Speech"
85, 2012, 39, "Jean Dujardin", "The Artist"
86, 2013, 55, "Daniel Day-Lewis", "Lincoln"
87, 2014, 44, "Matthew McConaughey", "Dallas Buyers Club"
88, 2015, 33, "Eddie Redmayne", "The Theory of Everything"
89, 2016, 41, "Leonardo DiCaprio", "The Revenant"
Can't render this file because it contains an unexpected character in line 10 and column 47.

124
tests/test_csv.py Normal file
View File

@ -0,0 +1,124 @@
import os
import json
import unittest
import jc.parsers.csv
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
class MyTests(unittest.TestCase):
def setUp(self):
# input
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-biostats.csv'), 'r') as f:
self.generic_csv_biostats = f.read()
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-cities.csv'), 'r') as f:
self.generic_csv_cities = f.read()
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-deniro.csv'), 'r') as f:
self.generic_csv_deniro = f.read()
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-example.csv'), 'r') as f:
self.generic_csv_example = f.read()
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-flyrna.tsv'), 'r') as f:
self.generic_csv_flyrna = f.read()
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-flyrna2.tsv'), 'r') as f:
self.generic_csv_flyrna2 = f.read()
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-homes-pipe.csv'), 'r') as f:
self.generic_csv_homes_pipe = f.read()
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-homes.csv'), 'r') as f:
self.generic_csv_homes = f.read()
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-insurance.csv'), 'r') as f:
self.generic_csv_insurance = f.read()
# output
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-biostats.json'), 'r') as f:
self.generic_csv_biostats_json = json.loads(f.read())
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-cities.json'), 'r') as f:
self.generic_csv_cities_json = json.loads(f.read())
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-deniro.json'), 'r') as f:
self.generic_csv_deniro_json = json.loads(f.read())
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-example.json'), 'r') as f:
self.generic_csv_example_json = json.loads(f.read())
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-flyrna.json'), 'r') as f:
self.generic_csv_flyrna_json = json.loads(f.read())
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-flyrna2.json'), 'r') as f:
self.generic_csv_flyrna2_json = json.loads(f.read())
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-homes-pipe.json'), 'r') as f:
self.generic_csv_homes_pipe_json = json.loads(f.read())
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-homes.json'), 'r') as f:
self.generic_csv_homes_json = json.loads(f.read())
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-insurance.json'), 'r') as f:
self.generic_csv_insurance_json = json.loads(f.read())
def test_csv_biostats(self):
"""
Test 'biostats.csv' file
"""
self.assertEqual(jc.parsers.csv.parse(self.generic_csv_biostats, quiet=True), self.generic_csv_biostats_json)
def test_csv_cities(self):
"""
Test 'cities.csv' file
"""
self.assertEqual(jc.parsers.csv.parse(self.generic_csv_cities, quiet=True), self.generic_csv_cities_json)
def test_csv_deniro(self):
"""
Test 'deniro.csv' file
"""
self.assertEqual(jc.parsers.csv.parse(self.generic_csv_deniro, quiet=True), self.generic_csv_deniro_json)
def test_csv_example(self):
"""
Test 'example.csv' file
"""
self.assertEqual(jc.parsers.csv.parse(self.generic_csv_example, quiet=True), self.generic_csv_example_json)
def test_csv_flyrna(self):
"""
Test 'flyrna.tsv' file
"""
self.assertEqual(jc.parsers.csv.parse(self.generic_csv_flyrna, quiet=True), self.generic_csv_flyrna_json)
def test_csv_flyrna2(self):
"""
Test 'flyrna2.tsv' file
"""
self.assertEqual(jc.parsers.csv.parse(self.generic_csv_flyrna2, quiet=True), self.generic_csv_flyrna2_json)
def test_csv_homes_pipe(self):
"""
Test 'homes-pipe.csv' file
"""
self.assertEqual(jc.parsers.csv.parse(self.generic_csv_homes_pipe, quiet=True), self.generic_csv_homes_pipe_json)
def test_csv_homes(self):
"""
Test 'homes.csv' file
"""
self.assertEqual(jc.parsers.csv.parse(self.generic_csv_homes, quiet=True), self.generic_csv_homes_json)
def test_csv_insurance(self):
"""
Test 'insurance.csv' file
"""
self.assertEqual(jc.parsers.csv.parse(self.generic_csv_insurance, quiet=True), self.generic_csv_insurance_json)
if __name__ == '__main__':
unittest.main()