diff options
author | Ammar Askar <ammar@ammaraskar.com> | 2021-07-04 23:14:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-04 23:14:33 (GMT) |
commit | 5644c7b3ffd49bed58dc095be6e6148e0bb4431e (patch) | |
tree | c53063e2f78685d1f284f6e333e05f44e49ea5ca /Lib/idlelib/idle_test | |
parent | 693cec0e2dcafa393ed5cdaa606f8dc8e3876adf (diff) | |
download | cpython-5644c7b3ffd49bed58dc095be6e6148e0bb4431e.zip cpython-5644c7b3ffd49bed58dc095be6e6148e0bb4431e.tar.gz cpython-5644c7b3ffd49bed58dc095be6e6148e0bb4431e.tar.bz2 |
bpo-43950: Print columns in tracebacks (PEP 657) (GH-26958)
The traceback.c and traceback.py mechanisms now utilize the newly added code.co_positions and PyCode_Addr2Location
to print carets on the specific expressions involved in a traceback.
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
Diffstat (limited to 'Lib/idlelib/idle_test')
-rw-r--r-- | Lib/idlelib/idle_test/test_run.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/idlelib/idle_test/test_run.py b/Lib/idlelib/idle_test/test_run.py index ec4637c..b289fa7 100644 --- a/Lib/idlelib/idle_test/test_run.py +++ b/Lib/idlelib/idle_test/test_run.py @@ -33,9 +33,9 @@ class ExceptionTest(unittest.TestCase): run.print_exception() tb = output.getvalue().strip().splitlines() - self.assertEqual(11, len(tb)) - self.assertIn('UnhashableException: ex2', tb[3]) - self.assertIn('UnhashableException: ex1', tb[10]) + self.assertEqual(13, len(tb)) + self.assertIn('UnhashableException: ex2', tb[4]) + self.assertIn('UnhashableException: ex1', tb[12]) data = (('1/0', ZeroDivisionError, "division by zero\n"), ('abc', NameError, "name 'abc' is not defined. " |