summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2022-10-15 22:13:33 (GMT)
committerGitHub <noreply@github.com>2022-10-15 22:13:33 (GMT)
commitbb56dead336357153a0c3b8cc9d9d6856d2c5a03 (patch)
treeb3e336da20cd08a82d86f19c054f8c780ee422da /Lib/idlelib
parent3a639bbeace73d54f7e5431d3224c8c8223d81ae (diff)
downloadcpython-bb56dead336357153a0c3b8cc9d9d6856d2c5a03.zip
cpython-bb56dead336357153a0c3b8cc9d9d6856d2c5a03.tar.gz
cpython-bb56dead336357153a0c3b8cc9d9d6856d2c5a03.tar.bz2
gh-98254: Include stdlib module names in error messages for NameErrors (#98255)
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/idle_test/test_run.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/idlelib/idle_test/test_run.py b/Lib/idlelib/idle_test/test_run.py
index ec4637c..a38e43d 100644
--- a/Lib/idlelib/idle_test/test_run.py
+++ b/Lib/idlelib/idle_test/test_run.py
@@ -39,7 +39,8 @@ class ExceptionTest(unittest.TestCase):
data = (('1/0', ZeroDivisionError, "division by zero\n"),
('abc', NameError, "name 'abc' is not defined. "
- "Did you mean: 'abs'?\n"),
+ "Did you mean: 'abs'? "
+ "Or did you forget to import 'abc'?\n"),
('int.reel', AttributeError,
"type object 'int' has no attribute 'reel'. "
"Did you mean: 'real'?\n"),