Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix idle test
  • Loading branch information
pablogsal committed Oct 14, 2022
commit a30504e229a7608fa693843fbb66ffc90adc8e8c
3 changes: 2 additions & 1 deletion Lib/idlelib/idle_test/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ def __eq__(self, other):

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"),
Expand Down
2 changes: 1 addition & 1 deletion Python/suggestions.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ offer_suggestions_for_attribute_error(PyAttributeErrorObject *exc)
return NULL;
}
// Add a trailer ". Did you mean: (...)?"
PyObject* result = PyUnicode_FromFormat(". Did you mean %R?", suggestion);
PyObject* result = PyUnicode_FromFormat(". Did you mean: %R?", suggestion);
Comment thread
pablogsal marked this conversation as resolved.
Outdated
Py_DECREF(suggestion);
return result;
}
Expand Down