Add a disabled mssql-python ODBC parity test suite - #177
Closed
Saurabh Singh (saurabh500) wants to merge 1 commit into
Closed
Add a disabled mssql-python ODBC parity test suite#177Saurabh Singh (saurabh500) wants to merge 1 commit into
Saurabh Singh (saurabh500) wants to merge 1 commit into
Conversation
mssql-python loads this driver with LoadLibraryW and calls the exports directly, so the driver owns the whole ODBC contract with no Driver Manager in between. This suite loads it the same way and pins the behaviour that contract depends on. All 22 cases are DISABLED. They describe behaviour the driver does not have yet; each one is enabled in the pull request that implements it. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e698c659-8b42-43f7-99ab-46f534b2489b
| # Windows-only for now: the loader uses LoadLibraryW/GetProcAddress and the | ||
| # fixtures assume a 2-byte wchar_t for SQLWCHAR. Porting it to dlopen and an | ||
| # explicit UTF-16 string type is tracked as future work. | ||
| if(WIN32) |
Contributor
Author
There was a problem hiding this comment.
This needs to be done for non-windows i.e. Linux/MacOS and Alpine linux as well.
📊 Code Coverage Report
Diff CoverageDiff: main...HEAD, staged and unstaged changesNo lines with coverage information in this diff. 🔗 Quick Links |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
A single-file GoogleTest suite pinning the ODBC behaviour that mssql-python depends on, plus
README-parity.mddescribing how to work through it.mssql-python does not use a Driver Manager. It calls
LoadLibraryWonmsodbcsql18.dlland resolves the entrypoints itself, so this driver alone owns the entire ODBC contract -- nothing normalises arguments, sequences calls, or covers for a missing export. The suite loads the driver the same way, which makes it a faithful stand-in for the Python integration suite and much faster to run.Every case is disabled
All 22 cases carry the gtest
DISABLED_prefix. CI builds and runs the binary, reports them as skipped, and exits 0. No database is needed for the skipped run.These describe behaviour the driver is expected to have, ahead of it having that behaviour. The intent is that cases are enabled one at a time, each in the pull request that implements the corresponding API work.
Two rules, also stated in the file header and the README:
To see where the driver currently stands:
mssql_python_parity_test.exe --gtest_also_run_disabled_testsCoverage
Transactions, block fetch and row-array binding, concurrent cursors,
SQLGetDataconversions and NULL/truncation reporting,SQLColAttribute, the five catalog functions, parameter binding, APD descriptor fields,SQLRowCount, andSQLMoreResults.Includes two cases for the data-at-execution path --
SQLParamData/SQLPutDatafor streamed parameters, and chunkedSQLGetDatafor LOB reads -- since mssql-python uses both for anything above its inline size threshold and neither was previously covered.README-parity.mdhas the full table and a suggested order to work through them, sequenced by which failures mask others.Notes
LoadLibraryW/GetProcAddressand the fixtures assume a 2-bytewchar_tforSQLWCHAR.CMakeLists.txtguards the target withif(WIN32). Porting todlopenand an explicit UTF-16 string type is future work.Related Issues
Follow-up to the mssql-python parity investigation in #175.