NO-SNOW: Apply test session parameters to doctest sessions#4209
Merged
Conversation
The session created in src/conftest.py for doctests did not run set_up_test_session_parameters, so parameters such as ENABLE_PYTHON_3_14 were not applied. Call it after the session is created so doctests run under the same session configuration as integration tests.
sfc-gh-aalam
approved these changes
May 4, 2026
…ogan/doctest-session-params
Collaborator
Author
|
passed here: wont add to PR gate |
sfc-gh-joshi
approved these changes
May 4, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4209 +/- ##
==========================================
- Coverage 95.42% 95.18% -0.25%
==========================================
Files 171 171
Lines 43835 43835
Branches 7513 7513
==========================================
- Hits 41829 41723 -106
- Misses 1226 1292 +66
- Partials 780 820 +40 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
NO-SNOW
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
The session fixture in
src/conftest.py(used for running doctests) creates aSessiondirectly and never callsset_up_test_session_parameters, so settings likeENABLE_PYTHON_3_14,ENABLE_DEFAULT_PYTHON_ARTIFACT_REPOSITORY,ENABLE_EXTRACTION_PUSHDOWN_EXTERNAL_PARQUET_FOR_COPY_PHASE_I, andENABLE_ROW_ACCESS_POLICYare not applied to doctests. This PR importsset_up_test_session_parametersfromtests/integ/session_parameters.py(the existingsys.path.append("tests/")already makes this importable) and calls it after the doctest session is created so doctests run with the same session configuration as integration tests. The helper already short-circuits whenlocal_testing_modeis true, so no additional guarding is needed.