mirror of
https://github.com/apache/arrow.git
synced 2026-10-29 17:15:39 +08:00
Rename environment variable per comments
This commit is contained in:
1 parent
e8cde58422
commit
0bb54d4cec
2 files changed
+3
-3
No files matched your search
@@ -117,7 +117,7 @@ class RecordBatchFileWriter(lib._RecordBatchFileWriter):
|
||||
def _get_legacy_format_default(use_legacy_format):
|
||||
if use_legacy_format is None:
|
||||
import os
|
||||
return bool(int(os.environ.get('PYARROW_LEGACY_IPC_FORMAT', '0')))
|
||||
return bool(int(os.environ.get('ARROW_PRE_0_15_IPC_FORMAT', '0')))
|
||||
else:
|
||||
return use_legacy_format
|
||||
|
||||
|
||||
@@ -325,13 +325,13 @@ def test_envvar_set_legacy_ipc_format():
|
||||
assert not writer._use_legacy_format
|
||||
|
||||
import os
|
||||
os.environ['PYARROW_LEGACY_IPC_FORMAT'] = '1'
|
||||
os.environ['ARROW_PRE_0_15_IPC_FORMAT'] = '1'
|
||||
writer = pa.RecordBatchStreamWriter(pa.BufferOutputStream(), schema)
|
||||
assert writer._use_legacy_format
|
||||
writer = pa.RecordBatchFileWriter(pa.BufferOutputStream(), schema)
|
||||
assert writer._use_legacy_format
|
||||
|
||||
del os.environ['PYARROW_LEGACY_IPC_FORMAT']
|
||||
del os.environ['ARROW_PRE_0_15_IPC_FORMAT']
|
||||
|
||||
|
||||
def test_stream_read_all(stream_fixture):
|
||||
|
||||
Reference in new issue
Block a user