gh-99894: Ensure the local names don't collide with the test file in traceback suggestion error checking (#99895)

Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
Pablo Galindo Salgado 2022-12-01 13:05:56 +00:00 committed by GitHub
parent f08e52ccb0
commit 0563be23a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -2978,9 +2978,9 @@ class SuggestionFormattingTestBase:
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)
@ -3168,9 +3168,9 @@ class SuggestionFormattingTestBase:
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)