From d159ac5d56377fff3be5e70c8ffb4b508a4a26d5 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Wed, 30 Nov 2022 11:41:58 +0000 Subject: [PATCH] fixup! gh-99894: Ensure the local names don't collide with the test file in traceback suggestion error checking --- Lib/test/test_traceback.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py index 655470fec95639..f28bbf62f605f7 100644 --- a/Lib/test/test_traceback.py +++ b/Lib/test/test_traceback.py @@ -2979,7 +2979,7 @@ class MyClass: with self.subTest(name=name): actual = self.get_suggestion(MyClass, name) self.assertNotIn("you mean", actual) - self.assertNotIn("'vvv'", actual) + self.assertNotIn("'vvv", actual) self.assertNotIn("'mom'", actual) self.assertNotIn("'id'", actual) self.assertNotIn("'w'", actual) @@ -3169,8 +3169,8 @@ def test_import_from_error_bad_suggestions_do_not_trigger_for_small_names(self): 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("'vvv'", actual) + self.assertNotIn("'mom'", actual) self.assertNotIn("'id'", actual) self.assertNotIn("'w'", actual) self.assertNotIn("'pytho'", actual)