MCPcopy Create free account
hub / github.com/Ishabdullah/Codey-v2 / test_suggest_fix

Method test_suggest_fix

tests/test_learning.py:276–287  ·  view source on GitHub ↗

Should suggest fix from error database.

(self)

Source from the content-addressed store, hash-verified

274 assert best == "use_patch"
275
276 def test_suggest_fix(self):
277 """Should suggest fix from error database."""
278 lm = LearningManager()
279 lm.learn_from_error_and_fix(
280 "ValueError",
281 "invalid literal for int",
282 "add try/except",
283 success=True
284 )
285
286 suggestion = lm.suggest_fix("ValueError", "invalid literal for int")
287 assert suggestion == "add try/except"
288
289 def test_get_preference(self):
290 """Should get learned preference."""

Callers

nothing calls this directly

Calls 3

suggest_fixMethod · 0.95
LearningManagerClass · 0.90

Tested by

no test coverage detected