Skip to content

Commit 0563be2

Browse files
pablogsalvstinner
andauthored
pythongh-99894: Ensure the local names don't collide with the test file in traceback suggestion error checking (python#99895)
Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent f08e52c commit 0563be2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Lib/test/test_traceback.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -2978,9 +2978,9 @@ class MyClass:
29782978
for name in ("b", "v", "m", "py"):
29792979
with self.subTest(name=name):
29802980
actual = self.get_suggestion(MyClass, name)
2981-
self.assertNotIn("you mean", actual)
2982-
self.assertNotIn("vvv", actual)
2983-
self.assertNotIn("mom", actual)
2981+
self.assertNotIn("Did you mean", actual)
2982+
self.assertNotIn("'vvv", actual)
2983+
self.assertNotIn("'mom'", actual)
29842984
self.assertNotIn("'id'", actual)
29852985
self.assertNotIn("'w'", actual)
29862986
self.assertNotIn("'pytho'", actual)
@@ -3168,9 +3168,9 @@ def test_import_from_error_bad_suggestions_do_not_trigger_for_small_names(self):
31683168
for name in ("b", "v", "m", "py"):
31693169
with self.subTest(name=name):
31703170
actual = self.get_import_from_suggestion(code, name)
3171-
self.assertNotIn("you mean", actual)
3172-
self.assertNotIn("vvv", actual)
3173-
self.assertNotIn("mom", actual)
3171+
self.assertNotIn("Did you mean", 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)