New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_pdb fails #86080
Comments
I was thinking about contributing to cpython so i cloned it and followed the tests mentioned on devguide.python.org. When i ran my tests, it failed on two of them: test_pdb and test_ssl. test_ssl had an issue already as i found here. test_pdb failure was the one which i didn't find here. It failed with the following message: == CPython 3.10.0a0 (heads/master:a937ab45d6, Oct 3 2020, 00:16:29) [GCC 9.3.0] ====================================================================== Traceback (most recent call last):
File "/mnt/sda2/github/cpython/Lib/test/test_pdb.py", line 1650, in test_errors_in_command
self.assertEqual(stdout.splitlines()[1:], [
AssertionError: Lists differ: ['(Pd[283 chars]efined", 'LEAVING RECURSIVE DEBUGGER', '(Pdb) ', '\x1b[?1034h'] != ['(Pd[283 chars]efined", 'LEAVING RECURSIVE DEBUGGER', '(Pdb) '] First list contains 1 additional elements. ['(Pdb) *** SyntaxError: unexpected EOF while parsing',
+ '(Pdb) ']
---------------------------------------------------------------------- Ran 43 tests in 5.143s FAILED (failures=1) == Tests result: FAILURE == 1 test failed: Total duration: 6.8 sec Is this happening only with me? |
Hi Sumagna, test_pdb appears to be working as expected on my machine. I realise this was posted a few months ago so would you mind trying again and seeing if the issue persists? If so, which OS are you running your tests on? |
Sumagna, Thanks for the report. The test is passing on our buildbots, so this is not a general problem with it. It is hard to do anything about this without information about the platform and environment on which you saw the failure. If you are still seeing it, please create a new issue and include these details. |
Re-opened as bpo-45242 (also identified the culprit) |
Léon's message from bpo-45242, which I closed as a duplicate of this. Leon: please try with 3.11 (best, repository main), 3.10, or at least 3.9. 3.8 and before only get security fixes. Building Python 3.7, I ran into the same issue reported [here] (only line numbers differ):
I have also managed to determine the cause. As can be seen, the output from this pdb invocation contains an extraneous ANSI control sequence ("interpret "meta" key, set eighth bit"). This happens when running the test inside the GNU (By the way, this was the only test that failed when running |
Here's the issue again when running test_pdb.py for 3.11 (repository main). The same problem now occurs twice, and only inside the ----- 8< ----- ~/Temp/cpython> ./python Lib/test/test_pdb.py Traceback (most recent call last):
File "/home/leon/Temp/cpython/Lib/test/test_pdb.py", line 1847, in test_errors_in_command
self.assertEqual(stdout.splitlines()[1:], [
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Lists differ: ['-> [278 chars]efined", 'LEAVING RECURSIVE DEBUGGER', '(Pdb) ', '\x1b[?1034h'] != ['-> [278 chars]efined", 'LEAVING RECURSIVE DEBUGGER', '(Pdb) '] First list contains 1 additional elements. ['-> pass',
+ '(Pdb) ']
====================================================================== Traceback (most recent call last):
File "/home/leon/Temp/cpython/Lib/test/test_pdb.py", line 1875, in test_issue34266
check('\\', 'No escaped character')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/leon/Temp/cpython/Lib/test/test_pdb.py", line 1870, in check
self.assertEqual(stdout.splitlines()[1:], [
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Lists differ: ['-> [13 chars] *** Cannot run \\: No escaped character', '(Pdb) \x1b[?1034h'] != ['-> [13 chars] *** Cannot run \\: No escaped character', '(Pdb) '] First differing element 2: - ['-> pass',
- '(Pdb) *** Cannot run \\: No escaped character',
+ ['-> pass', '(Pdb) *** Cannot run \\: No escaped character', '(Pdb) ']
? +++++++++++ ++++++++++
---------------------------------------------------------------------- FAILED (failures=2) |
So I went ahead to fix the issue and created a PR. I also signed the CLA, but I understand that needs a little time to process. |
screen
#28564Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: