diff options
author | Pablo Galindo Salgado <Pablogsal@gmail.com> | 2022-10-15 22:13:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-15 22:13:33 (GMT) |
commit | bb56dead336357153a0c3b8cc9d9d6856d2c5a03 (patch) | |
tree | b3e336da20cd08a82d86f19c054f8c780ee422da /Lib/idlelib | |
parent | 3a639bbeace73d54f7e5431d3224c8c8223d81ae (diff) | |
download | cpython-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.py | 3 |
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"), |