From: Pablo Galindo Salgado Date: Thu, 1 Dec 2022 13:05:56 +0000 (+0000) Subject: gh-99894: Ensure the local names don't collide with the test file in traceback sugges... X-Git-Tag: v3.12.0a3~36 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0563be23a557917228a8b48cbb31bda285a3a815;p=thirdparty%2FPython%2Fcpython.git gh-99894: Ensure the local names don't collide with the test file in traceback suggestion error checking (#99895) Co-authored-by: Victor Stinner --- diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py index c17bbb48b65b..95b1bae4f608 100644 --- a/Lib/test/test_traceback.py +++ b/Lib/test/test_traceback.py @@ -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)