Skip to content

FIX: Skip source-contract tests for isolated wheel runs - #749

Merged
Gaurav Sharma (bewithgaurav) merged 1 commit into
mainfrom
bewithgaurav/fix-isolated-wheel-source-test
Sep 4, 2026
Merged

FIX: Skip source-contract tests for isolated wheel runs#749
Gaurav Sharma (bewithgaurav) merged 1 commit into
mainfrom
bewithgaurav/fix-isolated-wheel-source-test

Conversation

@bewithgaurav

@bewithgaurav Gaurav Sharma (bewithgaurav) commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Work Item / Issue Reference

ADO Work Item: Fixed AB#47762


Summary

Skip the Windows DLL source-contract tests when release validation intentionally runs from an isolated wheel without the source tree. Keep the loader presence and hardening assertions active in normal source checkouts.

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>
@github-actions github-actions Bot added the pr-size: small Minimal code update label Sep 3, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

📊 Code Coverage Report

🔥 Diff Coverage

100%


🎯 Overall Coverage

82%


📈 Total Lines Covered: 7772 out of 9444
📁 Project: mssql-python


Diff Coverage

Diff: main...HEAD, staged and unstaged changes

No lines with coverage information in this diff.


📋 Files Needing Attention

📉 Files with overall lowest coverage (click to expand)
mssql_python.pybind.logger_bridge.cpp: 58.9%
mssql_python.pybind.ddbc_bindings.h: 61.5%
mssql_python.pybind.logger_bridge.hpp: 70.8%
mssql_python.pybind.ddbc_bindings.cpp: 75.6%
mssql_python.__init__.py: 77.6%
mssql_python.row.py: 77.6%
mssql_python.pybind.connection.connection_pool.cpp: 81.6%
mssql_python.pybind.connection.connection.cpp: 84.4%
mssql_python.logging.py: 85.5%
mssql_python.connection.py: 85.9%

🔗 Quick Links

⚙️ Build Summary 📋 Coverage Details

View Azure DevOps Build

Browse Full Coverage Report

@bewithgaurav
Gaurav Sharma (bewithgaurav) marked this pull request as ready for review September 3, 2026 17:06
Copilot AI lite review requested due to automatic review settings September 3, 2026 17:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change is a narrowly-scoped, correct skip guard that prevents expected failures in isolated wheel runs while keeping the assertions active in normal source checkouts.

Pull request overview

This PR updates the Windows DLL source-contract regression tests to be automatically skipped when the test environment is an isolated wheel run that does not include the repository source tree (specifically the mssql_python/pybind/ sources). This preserves the intended “source-contract” hardening assertions when running tests from a normal source checkout, while preventing false failures in release validation scenarios that intentionally lack source files.

Changes:

  • Add a module-level pytestmark = pytest.mark.skipif(...) guard to skip the entire test module when mssql_python/pybind/ is not present.
  • Refactor the loader source path construction by introducing _PYBIND_DIR and deriving _LOADER_SRC from it.
File summaries
File Description
tests/test_026_windows_dll_search.py Skips source-contract loader hardening tests when running without a source checkout (isolated wheel scenario).
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@bewithgaurav
Gaurav Sharma (bewithgaurav) merged commit ff5897f into main Sep 4, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-size: small Minimal code update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants