FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-121651: Fix pdb header test by gaogaotiantian · Pull Request #121724 · python/cpython · GitHub

/ cpython Public

gh-121651: Fix pdb header test - #121724

Merged
gaogaotiantian merged 2 commits into
python:mainfrom
gaogaotiantian:fix-pdb-header-test
Jul 13, 2024
Merged

gh-121651: Fix pdb header test#121724
gaogaotiantian merged 2 commits into
python:mainfrom
gaogaotiantian:fix-pdb-header-test

Conversation

gaogaotiantian commented Jul 13, 2024
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

In the header test for pdb.set_trace, we redirected stdout to a string buffer, but that would only work when we create the Pdb instance after the patch. Due to the changes in #121451 , that's not always guaranteed. So for this test, we clear the Pdb._last_pdb_instance before pdb.set_trace(), which enforces pdb.set_trace() to create a new Pdb instance which has the redirected stdout.

bedevere-app Bot added tests Tests in the Lib/test dir awaiting core review labels Jul 13, 2024
gaogaotiantian added skip news and removed tests Tests in the Lib/test dir awaiting core review labels Jul 13, 2024

Copy link
Copy Markdown
Member Author

@Eclips4 feel free to take a look at this fix and confirm this works. I tried it locally and ./python -m test test_pdb --forever worked fine.

Eclips4 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@Eclips4 feel free to take a look at this fix and confirm this works. I tried it locally and ./python -m test test_pdb --forever worked fine.

Yes, I can confirm that this fixes the problem. Thanks!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL