MCPcopy Create free account
hub / github.com/apache/arrow / test_boolean_values

Method test_boolean_values

c_glib/test/test-csv-reader.rb:121–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119 end
120
121 def test_boolean_values
122 options = Arrow::CSVReadOptions.new
123 true_values = ["Start", "Restart"]
124 options.true_values = true_values
125 assert_equal(true_values, options.true_values)
126
127 false_values = ["Shutdown"]
128 options.false_values = false_values
129 assert_equal(false_values, options.false_values)
130
131 table = Arrow::CSVReader.new(open_input(<<-CSV), options)
132message,count
133"Start",2
134"Shutdown",9
135"Restart",5
136 CSV
137 columns = {
138 "message" => build_boolean_array([true, false, true]),
139 "count" => build_int64_array([2, 9, 5]),
140 }
141 assert_equal(build_table(columns),
142 table.read)
143 end
144
145 def test_add_true_value
146 options = Arrow::CSVReadOptions.new

Callers

nothing calls this directly

Calls 2

newMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected