diff --git a/onnxruntime/test/python/onnxruntime_test_python.py b/onnxruntime/test/python/onnxruntime_test_python.py index 3af6e8ccacfb8..f3ebc92409f77 100644 --- a/onnxruntime/test/python/onnxruntime_test_python.py +++ b/onnxruntime/test/python/onnxruntime_test_python.py @@ -1307,7 +1307,7 @@ def test_session_options_add_external_initializers(self): def test_register_custom_ops_library(self): if sys.platform.startswith("win"): - shared_library = "custom_op_library.dll" + shared_library = os.path.abspath("custom_op_library.dll") if not os.path.exists(shared_library): raise FileNotFoundError(f"Unable to find '{shared_library}'") @@ -1724,7 +1724,7 @@ def test_register_custom_e_ps_library(self): return if sys.platform.startswith("win"): - shared_library = "test_execution_provider.dll" + shared_library = os.path.abspath("test_execution_provider.dll") elif sys.platform.startswith("darwin"): # exclude for macos