MCPcopy Index your code
hub / github.com/python/cpython / test_suggestions

Method test_suggestions

Lib/test/test_traceback.py:4151–4192  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4149
4150class BaseSuggestionTests(SuggestionFormattingTestMixin):
4151 def test_suggestions(self):
4152 class Substitution:
4153 noise = more_noise = a = bc = None
4154 blech = None
4155
4156 class Elimination:
4157 noise = more_noise = a = bc = None
4158 blch = None
4159
4160 class Addition:
4161 noise = more_noise = a = bc = None
4162 bluchin = None
4163
4164 class SubstitutionOverElimination:
4165 blach = None
4166 bluc = None
4167
4168 class SubstitutionOverAddition:
4169 blach = None
4170 bluchi = None
4171
4172 class EliminationOverAddition:
4173 blucha = None
4174 bluc = None
4175
4176 class CaseChangeOverSubstitution:
4177 Luch = None
4178 fluch = None
4179 BLuch = None
4180
4181 for cls, suggestion in [
4182 (Addition, "'.bluchin'"),
4183 (Substitution, "'.blech'"),
4184 (Elimination, "'.blch'"),
4185 (Addition, "'.bluchin'"),
4186 (SubstitutionOverElimination, "'.blach'"),
4187 (SubstitutionOverAddition, "'.blach'"),
4188 (EliminationOverAddition, "'.bluc'"),
4189 (CaseChangeOverSubstitution, "'.BLuch'"),
4190 ]:
4191 actual = self.get_suggestion(cls(), 'bluch')
4192 self.assertIn('Did you mean ' + suggestion, actual)
4193
4194 def test_suggestions_underscored(self):
4195 class A:

Callers

nothing calls this directly

Calls 3

get_suggestionMethod · 0.80
assertInMethod · 0.80
clsClass · 0.50

Tested by

no test coverage detected