Skip to content

NO-SNOW: Apply test session parameters to doctest sessions#4209

Merged
sfc-gh-bkogan merged 5 commits into
mainfrom
bkogan/doctest-session-params
May 4, 2026
Merged

NO-SNOW: Apply test session parameters to doctest sessions#4209
sfc-gh-bkogan merged 5 commits into
mainfrom
bkogan/doctest-session-params

Conversation

@sfc-gh-bkogan

@sfc-gh-bkogan sfc-gh-bkogan commented May 4, 2026

Copy link
Copy Markdown
Collaborator
  1. Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    NO-SNOW

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
      • If this test skips Local Testing mode, I'm requesting review from @snowflakedb/local-testing
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am adding new credentials
    • I am adding a new dependency
    • If this is a new feature/behavior, I'm adding the Local Testing parity changes.
    • I acknowledge that I have ensured my changes to be thread-safe. Follow the link for more information: Thread-safe Developer Guidelines
    • If adding any arguments to public Snowpark APIs or creating new public Snowpark APIs, I acknowledge that I have ensured my changes include AST support. Follow the link for more information: AST Support Guidelines
  3. Please describe how your code solves the related issue.

    The session fixture in src/conftest.py (used for running doctests) creates a Session directly and never calls set_up_test_session_parameters, so settings like ENABLE_PYTHON_3_14, ENABLE_DEFAULT_PYTHON_ARTIFACT_REPOSITORY, ENABLE_EXTRACTION_PUSHDOWN_EXTERNAL_PARQUET_FOR_COPY_PHASE_I, and ENABLE_ROW_ACCESS_POLICY are not applied to doctests. This PR imports set_up_test_session_parameters from tests/integ/session_parameters.py (the existing sys.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 when local_testing_mode is true, so no additional guarding is needed.

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-bkogan sfc-gh-bkogan added the NO-CHANGELOG-UPDATES This pull request does not need to update CHANGELOG.md label May 4, 2026
@sfc-gh-bkogan

Copy link
Copy Markdown
Collaborator Author

@sfc-gh-bkogan sfc-gh-bkogan marked this pull request as ready for review May 4, 2026 20:43
@sfc-gh-bkogan sfc-gh-bkogan requested review from a team as code owners May 4, 2026 20:43
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.18%. Comparing base (e56041f) to head (5e1370b).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sfc-gh-bkogan sfc-gh-bkogan enabled auto-merge (squash) May 4, 2026 21:57
@sfc-gh-bkogan sfc-gh-bkogan merged commit 2051e02 into main May 4, 2026
69 of 76 checks passed
@sfc-gh-bkogan sfc-gh-bkogan deleted the bkogan/doctest-session-params branch May 4, 2026 23:31
@github-actions github-actions Bot locked and limited conversation to collaborators May 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

NO-CHANGELOG-UPDATES This pull request does not need to update CHANGELOG.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants