This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: test_pdb fails
Type: Stage: resolved
Components: Tests Versions: Python 3.7
Status: closed Resolution: duplicate
Dependencies: Superseder: test_pdb fails
View: 41914
Assigned To: Nosy List: oliphaunt
Priority: normal Keywords:

Created on 2021-09-19 19:20 by oliphaunt, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg402165 - (view) Author: Léon Planken (oliphaunt) * Date: 2021-09-19 19:26
This is a re-opening of issue 41914 (and my first issue, so apologies for any mistakes).  Building Python 3.7, I ran into the same issue reported there (only line numbers differ):

FAIL: test_errors_in_command (__main__.PdbTestCase)
Traceback (most recent call last):
  File "Lib/test/", line 1535, in test_errors_in_command
    '(Pdb) ',
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.
First extra element 9:

  ['(Pdb) *** SyntaxError: unexpected EOF while parsing',
   '*** SyntaxError: unexpected EOF while parsing',
   '> <string>(1)<module>()',
   "((Pdb)) *** NameError: name 'doesnotexist' is not defined",
-  '(Pdb) ',
?          ^

+  '(Pdb) ']
?          ^

-  '\x1b[?1034h']

Ran 39 tests in 1.024s

FAILED (failures=1)

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 `screen` environment.  Run the test outside `screen`, and the problem goes away.
msg402167 - (view) Author: Léon Planken (oliphaunt) * Date: 2021-09-19 19:29
(By the way, this was the only test that failed when running `make test` inside the `screen` environment.)
Date User Action Args
2022-04-11 14:59:50adminsetgithub: 89405
2021-09-24 20:09:24terry.reedysetstatus: open -> closed
superseder: test_pdb fails
resolution: duplicate
stage: resolved
2021-09-19 19:29:07oliphauntsetmessages: + msg402167
2021-09-19 19:26:01oliphauntsetmessages: + msg402165
2021-09-19 19:20:19oliphauntcreate