hiroyuki-sato commented on code in PR #49209:
URL: https://github.com/apache/arrow/pull/49209#discussion_r2787953816
##########
ruby/red-arrow-format/test/test-writer.rb:
##########
@@ -996,35 +919,23 @@ def test_write
class TestFileWriter < Test::Unit::TestCase
include WriterTests
- def setup
- Dir.mktmpdir do |tmp_dir|
- path = File.join(tmp_dir, "data.arrow")
- File.open(path, "wb") do |output|
- writer = ArrowFormat::FileWriter.new(output)
- write(writer)
- end
- data = File.open(path, "rb", &:read).freeze
- table = Arrow::Table.load(Arrow::Buffer.new(data), format: :arrow)
- @type = table.value.data_type
- @values = table.value.values
- end
+ def file_extension
+ "arrow"
+ end
+
+ def writer_class
+ ArrowFormat::FileWriter
end
end
class TestStreamingWriter < Test::Unit::TestCase
include WriterTests
- def setup
- Dir.mktmpdir do |tmp_dir|
- path = File.join(tmp_dir, "data.arrows")
- File.open(path, "wb") do |output|
- writer = ArrowFormat::StreamingWriter.new(output)
- write(writer)
- end
- data = File.open(path, "rb", &:read).freeze
- table = Arrow::Table.load(Arrow::Buffer.new(data), format: :arrows)
- @type = table.value.data_type
- @values = table.value.values
- end
+ def file_extension
+ "arrows"
Review Comment:
Just for interest: Use **arrow** and **arrows** intentionally?
```ruby
class TestFileWriter < Test::Unit::TestCase
def file_extension
"arrow"
end
end
class TestStreamingWriter < Test::Unit::TestCase
def file_extension
"arrows"
end
end
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]