Skip to content

Commit d159ac5

Browse files
committed
fixup! pythongh-99894: Ensure the local names don't collide with the test file in traceback suggestion error checking
1 parent 5612e56 commit d159ac5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/test/test_traceback.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2979,7 +2979,7 @@ class MyClass:
29792979
with self.subTest(name=name):
29802980
actual = self.get_suggestion(MyClass, name)
29812981
self.assertNotIn("you mean", actual)
2982-
self.assertNotIn("'vvv'", actual)
2982+
self.assertNotIn("'vvv", actual)
29832983
self.assertNotIn("'mom'", actual)
29842984
self.assertNotIn("'id'", actual)
29852985
self.assertNotIn("'w'", actual)
@@ -3169,8 +3169,8 @@ def test_import_from_error_bad_suggestions_do_not_trigger_for_small_names(self):
31693169
with self.subTest(name=name):
31703170
actual = self.get_import_from_suggestion(code, name)
31713171
self.assertNotIn("you mean", actual)
3172-
self.assertNotIn("vvv", actual)
3173-
self.assertNotIn("mom", actual)
3172+
self.assertNotIn("'vvv'", actual)
3173+
self.assertNotIn("'mom'", actual)
31743174
self.assertNotIn("'id'", actual)
31753175
self.assertNotIn("'w'", actual)
31763176
self.assertNotIn("'pytho'", actual)

0 commit comments

Comments
 (0)