bpo-41914: Fix issue running test_pdb inside GNU screen#28564
bpo-41914: Fix issue running test_pdb inside GNU screen#28564leonplanken wants to merge 1 commit into
screen#28564Conversation
For some reason, two tests in test_pdb failed when running inside GNU `screen`. The `screen` environment injects an ANSI control sequence into the output from `pdb`, which did not match the expected output.
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: @phaunt For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
|
This PR is stale because it has been open for 30 days with no activity. |
| f'(Pdb) *** Cannot run {bad_arg}: {msg}', | ||
| '(Pdb) ', | ||
| ]) | ||
| self.assertIn(f'(Pdb) *** Cannot run {bad_arg}: {msg}', stdout) |
There was a problem hiding this comment.
Any reason to remove the other expected lines?
| @@ -0,0 +1,4 @@ | |||
| Fix issue running test_pdb inside GNU `screen`: for some reason, two tests | |||
There was a problem hiding this comment.
I'd remove everything after the first colon, NEWS entries just need to say what the change is, not a detailed motivation.
| '(Pdb) ', | ||
| ]) | ||
| ] | ||
| self.assertTrue(all(e == s for (e, s) in zip(stdout_lines, expected_lines))) |
There was a problem hiding this comment.
This could use a comment explaining why we aren't checking for an exact match.
Also, the use of assertTrue means we won't get a detailed error if the test fails. Perhaps you could loop over the pairs of lines and self.assertEqual for each line instead.
iritkatriel
left a comment
There was a problem hiding this comment.
See @JelleZijlstra 's comments.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
|
I cannot reproduce with Python 3.11 (or main branch) under Without a good reproducer, and with unaddressed review comments, it's probably best to close this PR. I'll do so in a month if there's no follow-up. |
|
Hi Petr, thanks for following up. I'll see if I still get the issue, and gather the requested information. |
|
I got (and still get) this issue in screen version 4.05.00 under Debian 9.13 Stretch, but can't reproduce in that same version of screen under Ubuntu 22.04 Jammy. So I think this can be closed. I'm not savvy enough to parse it myself, but for the record, here's the output of |
|
The extra sequence, Presumably this is related to We should probably change tests to ignore all ANSI escape sequences -- there's apparently bunch of stuff that readline can try to set up an unknown terminal. However, since it looks like it last appeared on out-of-support Debian, it likely won't make the top of anyone's TODO list.
Agree. Thanks for following up! |
For some reason, two tests in test_pdb failed when running inside GNU
screen. Thescreenenvironment injects an ANSI control sequence intothe output from
pdb, which did not match the expected output.https://bugs.python.org/issue41914