From 980ed359a6a16e9be0cad0dfcafd2058d5165c24 Mon Sep 17 00:00:00 2001 From: Gaurav Sharma <223556219+Copilot@users.noreply.github.com> Date: Thu, 3 Sep 2026 22:12:26 +0530 Subject: [PATCH] FIX: Skip source-contract tests for isolated wheel runs Keep the Windows DLL hardening guard active in source checkouts while skipping it when release validation intentionally installs a wheel with no source tree. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/test_026_windows_dll_search.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/test_026_windows_dll_search.py b/tests/test_026_windows_dll_search.py index 24835ef3..8b9b3f95 100644 --- a/tests/test_026_windows_dll_search.py +++ b/tests/test_026_windows_dll_search.py @@ -21,7 +21,14 @@ import re from pathlib import Path -_LOADER_SRC = Path(__file__).resolve().parents[1] / "mssql_python" / "pybind" / "ddbc_bindings.cpp" +import pytest + +_PYBIND_DIR = Path(__file__).resolve().parents[1] / "mssql_python" / "pybind" +_LOADER_SRC = _PYBIND_DIR / "ddbc_bindings.cpp" +pytestmark = pytest.mark.skipif( + not _PYBIND_DIR.is_dir(), + reason="requires a source checkout; isolated wheel tests omit the source tree", +) def _code_without_comments(text):