Skip to content
Merged
Changes from all commits
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
9 changes: 5 additions & 4 deletions Lib/test/test_traceback.py
Original file line number Diff line number Diff line change
Expand Up @@ -4232,8 +4232,8 @@ def make_module(self, code):

return mod_name

def get_import_from_suggestion(self, mod_dict, name):
modname = self.make_module(mod_dict)
def get_import_from_suggestion(self, code, name):
modname = self.make_module(code)

def callable():
try:
Expand Down Expand Up @@ -4416,8 +4416,9 @@ def func():
def test_name_error_suggestions_with_non_string_candidates(self):
def func():
abc = 1
globals()[0] = 1
abv
custom_globals = globals().copy()
custom_globals[0] = 1
print(eval("abv", custom_globals, locals()))
actual = self.get_suggestion(func)
self.assertIn("abc", actual)

Expand Down
Loading