Skip to content

Commit

Permalink
gh-99894: Ensure the local names don't collide with the test file in …
Browse files Browse the repository at this point in the history
…traceback suggestion error checking (#99895)

Co-authored-by: Victor Stinner <vstinner@python.org>
  • Loading branch information
pablogsal and vstinner authored Dec 1, 2022
1 parent f08e52c commit 0563be2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Lib/test/test_traceback.py
Original file line number Diff line number Diff line change
Expand Up @@ -2978,9 +2978,9 @@ class MyClass:
for name in ("b", "v", "m", "py"):
with self.subTest(name=name):
actual = self.get_suggestion(MyClass, name)
self.assertNotIn("you mean", actual)
self.assertNotIn("vvv", actual)
self.assertNotIn("mom", actual)
self.assertNotIn("Did you mean", actual)
self.assertNotIn("'vvv", actual)
self.assertNotIn("'mom'", actual)
self.assertNotIn("'id'", actual)
self.assertNotIn("'w'", actual)
self.assertNotIn("'pytho'", actual)
Expand Down Expand Up @@ -3168,9 +3168,9 @@ def test_import_from_error_bad_suggestions_do_not_trigger_for_small_names(self):
for name in ("b", "v", "m", "py"):
with self.subTest(name=name):
actual = self.get_import_from_suggestion(code, name)
self.assertNotIn("you mean", actual)
self.assertNotIn("vvv", actual)
self.assertNotIn("mom", actual)
self.assertNotIn("Did you mean", actual)
self.assertNotIn("'vvv'", actual)
self.assertNotIn("'mom'", actual)
self.assertNotIn("'id'", actual)
self.assertNotIn("'w'", actual)
self.assertNotIn("'pytho'", actual)
Expand Down

0 comments on commit 0563be2

Please sign in to comment.