Rename environment variable per comments

This commit is contained in:
Wes McKinney committed 2019-09-18 10:06:45 -05:00
1 parent e8cde58422
commit 0bb54d4cec
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -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
+2 -2
View File
@@ -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):