diff options
author | gaogaotiantian <gaogaotiantian@hotmail.com> | 2023-03-27 20:37:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-27 20:37:22 (GMT) |
commit | 36067532467ec58c87ac9c140e555e1866431981 (patch) | |
tree | 4907a023a9f5b03fa5533b08d6829922ac6d2686 /Lib/test/test_pdb.py | |
parent | 2cdc5189a6bc3157fddd814662bde99ecfd77529 (diff) | |
download | cpython-36067532467ec58c87ac9c140e555e1866431981.zip cpython-36067532467ec58c87ac9c140e555e1866431981.tar.gz cpython-36067532467ec58c87ac9c140e555e1866431981.tar.bz2 |
gh-103023: Add SyntaxError check in pdb's `display` command (#103024)
Co-authored-by: Ćukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Lib/test/test_pdb.py')
-rw-r--r-- | Lib/test/test_pdb.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py index e96dc7f..ae9c5d7 100644 --- a/Lib/test/test_pdb.py +++ b/Lib/test/test_pdb.py @@ -586,6 +586,8 @@ def test_pdb_display_command(): ... a = 4 >>> with PdbTestInput([ # doctest: +ELLIPSIS + ... 'display +', + ... 'display', ... 'display a', ... 'n', ... 'display', @@ -600,6 +602,10 @@ def test_pdb_display_command(): ... test_function() > <doctest test.test_pdb.test_pdb_display_command[0]>(4)test_function() -> a = 1 + (Pdb) display + + Unable to display +: ** raised SyntaxError: invalid syntax ** + (Pdb) display + No expression is being displayed (Pdb) display a display a: 0 (Pdb) n |