We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 375560e commit c975c70Copy full SHA for c975c70
dpctl/tests/test_sycl_queue.py
@@ -575,12 +575,14 @@ def dpctl_cython_extension(tmp_path_factory):
575
cwd=dr,
576
)
577
if res.returncode == 0:
578
+ import glob
579
from importlib.util import module_from_spec, spec_from_file_location
580
581
sfx = sysconfig.get_config_vars()["EXT_SUFFIX"]
- spec = spec_from_file_location(
582
- "_cython_api", os.path.join(dr, "_cython_api" + sfx)
583
- )
+ pth = glob.glob(os.path.join(dr, "_cython_api*" + sfx))
+ if not pth:
584
+ pytest.skip("Cython extension was not built")
585
+ spec = spec_from_file_location("_cython_api", pth[0])
586
builder_module = module_from_spec(spec)
587
spec.loader.exec_module(builder_module)
588
return builder_module
0 commit comments