diff options
author | Tian Gao <gaogaotiantian@hotmail.com> | 2024-05-04 10:26:40 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-04 10:26:40 (GMT) |
commit | 00da0afa0d98ce1fae67f7258c7f3db2b81a07e7 (patch) | |
tree | c45fae309e3ba5c4ef905a92fed5358ff496d7d3 /Lib/test | |
parent | 85af78996117dbe8ad45716633a3d6c39ff7bab2 (diff) | |
download | cpython-00da0afa0d98ce1fae67f7258c7f3db2b81a07e7.zip cpython-00da0afa0d98ce1fae67f7258c7f3db2b81a07e7.tar.gz cpython-00da0afa0d98ce1fae67f7258c7f3db2b81a07e7.tar.bz2 |
gh-113081: Print colorized exception just like built-in traceback in pdb (#113082)
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_pdb.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py index a3d2dda..c9ea527 100644 --- a/Lib/test/test_pdb.py +++ b/Lib/test/test_pdb.py @@ -15,7 +15,7 @@ import zipapp from contextlib import ExitStack, redirect_stdout from io import StringIO from test import support -from test.support import os_helper +from test.support import force_not_colorized, os_helper from test.support.import_helper import import_module from test.support.pty_helper import run_pty, FakeInput from unittest.mock import patch @@ -2919,6 +2919,7 @@ def bœr(): self.assertNotIn(b'Error', stdout, "Got an error running test script under PDB") + @force_not_colorized def test_issue16180(self): # A syntax error in the debuggee. script = "def f: pass\n" @@ -2932,6 +2933,7 @@ def bœr(): 'Fail to handle a syntax error in the debuggee.' .format(expected, stderr)) + @force_not_colorized def test_issue84583(self): # A syntax error from ast.literal_eval should not make pdb exit. script = "import ast; ast.literal_eval('')\n" |