diff --git a/python/pyarrow/tests/test_fs.py b/python/pyarrow/tests/test_fs.py index 23fc405196070..287b744f5ef31 100644 --- a/python/pyarrow/tests/test_fs.py +++ b/python/pyarrow/tests/test_fs.py @@ -1910,7 +1910,7 @@ def test_concurrent_fs_init(): code = """if 1: import threading import pytest - from pyarrow.fs import (FileSystem, S3FileSystem + from pyarrow.fs import (FileSystem, S3FileSystem, ensure_s3_initialized, finalize_s3) threads = [] for i in range(4): @@ -1922,4 +1922,5 @@ def test_concurrent_fs_init(): thread.join() finalize_s3() - """ + """ + subprocess.check_call([sys.executable, "-c", code])