Skip to content

Commit 6e1ac81

Browse files
committed
Check whether adding pa.get_library_dirs() with os.add_dll_directory has any effect on importing the built module
1 parent 0caa95e commit 6e1ac81

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎python/pyarrow/tests/test_cython.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ def test_cython_api(tmpdir):
116116
orig_path = sys.path[:]
117117
sys.path.insert(0, str(tmpdir))
118118
try:
119+
if sys.platform == 'win32':
120+
for dir in pa.get_library_dirs():
121+
os.add_dll_directory(dir)
119122
mod = __import__('pyarrow_cython_example')
120123
check_cython_example_module(mod)
121124
finally:
@@ -187,6 +190,9 @@ def test_visit_strings(tmpdir):
187190
env=subprocess_env)
188191

189192
sys.path.insert(0, str(tmpdir))
193+
if sys.platform == 'win32':
194+
for dir in pa.get_library_dirs():
195+
os.add_dll_directory(dir)
190196
mod = __import__('bound_function_visit_strings')
191197

192198
strings = ['a', 'b', 'c']

0 commit comments

Comments
 (0)