Use sys.executable

Python command may not be "python".
This commit is contained in:
Sutou Kouhei committed 2019-12-06 14:50:10 +09:00
1 parent 240ab77430
commit 519c5f1d34
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -1086,8 +1086,8 @@ def test_plasma_list():
@pytest.mark.plasma
def test_object_id_randomness():
cmd = "from pyarrow import plasma; print(plasma.ObjectID.from_random())"
first_object_id = subprocess.check_output(["python", "-c", cmd])
second_object_id = subprocess.check_output(["python", "-c", cmd])
first_object_id = subprocess.check_output([sys.executable, "-c", cmd])
second_object_id = subprocess.check_output([sys.executable, "-c", cmd])
assert first_object_id != second_object_id
+1 -1
View File
@@ -917,7 +917,7 @@ def test_deserialize_components_in_different_process():
subprocess_env = test_util.get_modified_env_with_pythonpath()
print("** sys.path =", sys.path)
print("** setting PYTHONPATH to:", subprocess_env['PYTHONPATH'])
subprocess.check_call(["python", "-c", code], env=subprocess_env)
subprocess.check_call([sys.executable, "-c", code], env=subprocess_env)
def test_serialize_read_concatenated_records():