MCPcopy Create free account
hub / github.com/apache/arrow / test_runtime_info

Function test_runtime_info

python/pyarrow/tests/test_misc.py:105–123  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

103
104
105def test_runtime_info():
106 info = pa.runtime_info()
107 assert isinstance(info, pa.RuntimeInfo)
108 possible_simd_levels = ('none', 'sse4_2', 'avx', 'avx2', 'avx512')
109 assert info.simd_level in possible_simd_levels
110 assert info.detected_simd_level in possible_simd_levels
111
112 if info.simd_level != 'none':
113 env = os.environ.copy()
114 env['ARROW_USER_SIMD_LEVEL'] = 'none'
115 code = f"""if 1:
116 import pyarrow as pa
117
118 info = pa.runtime_info()
119 assert info.simd_level == 'none', info.simd_level
120 assert info.detected_simd_level == {info.detected_simd_level!r},\
121 info.detected_simd_level
122 """
123 subprocess.check_call([sys.executable, "-c", code], env=env)
124
125
126@pytest.mark.processes

Callers

nothing calls this directly

Calls 1

copyMethod · 0.80

Tested by

no test coverage detected