Skip to content

Patching WT_SESSION so that Credentails test does not fail on Windows…#12652

Merged
lukasmasuch merged 4 commits intostreamlit:developfrom
ben05allen:windows-tests
Oct 8, 2025
Merged

Patching WT_SESSION so that Credentails test does not fail on Windows…#12652
lukasmasuch merged 4 commits intostreamlit:developfrom
ben05allen:windows-tests

Conversation

@ben05allen
Copy link
Copy Markdown
Contributor

… Terminal

Describe your changes

When running tests with make python-test on Winows WSL2, the following test fails because WT_SESSION is truthy;

FAILED tests/streamlit/runtime/credentials_test.py::CredentialsModulesTest::test_show_emojis_windows - AssertionError: assert '👋' not in '\n 👋 \...ail: \x1b[0m'

I have added patch for WT_SESSION env var so that that it is falsey when running the credential test on Windows Terminal

GitHub Issue Link (if applicable)

Testing Plan

  • Explanation of why no additional tests are needed
  • Unit Tests (JS and/or Python)
  • E2E Tests
  • Any manual testing needed?

Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@snyk-io
Copy link
Copy Markdown
Contributor

snyk-io bot commented Sep 28, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@lukasmasuch lukasmasuch requested a review from Copilot October 8, 2025 16:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a failing test on Windows WSL2 by patching the WT_SESSION environment variable to ensure emoji display behavior is correctly tested. The test was failing because Windows Terminal sets WT_SESSION to a truthy value, which affects the emoji display logic in the credentials module.

Key changes:

  • Added environment variable patch to ensure consistent test behavior across different Windows environments

@lukasmasuch lukasmasuch added security-assessment-completed change:other PR contains other type of change impact:internal PR changes only affect internal code labels Oct 8, 2025
Copy link
Copy Markdown
Collaborator

@lukasmasuch lukasmasuch left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Thanks for the contribution!

@lukasmasuch lukasmasuch enabled auto-merge (squash) October 8, 2025 16:22
@lukasmasuch lukasmasuch merged commit dda4613 into streamlit:develop Oct 8, 2025
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:other PR contains other type of change impact:internal PR changes only affect internal code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants