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

Method test_suggest_fix

tests/test_learning.py:172–178  ·  view source on GitHub ↗

Should suggest fix for known error.

(self)

Source from the content-addressed store, hash-verified

170 assert len(similar) > 0
171
172 def test_suggest_fix(self):
173 """Should suggest fix for known error."""
174 db = ErrorDatabase()
175 db.learn_from_error("ModuleNotFoundError", "No module named 'flask'", "pip install flask", True)
176
177 suggestion = db.suggest_fix("ModuleNotFoundError", "No module named 'flask'")
178 assert suggestion == "pip install flask"
179
180 def test_statistics(self):
181 """Should return error statistics."""

Callers

nothing calls this directly

Calls 3

learn_from_errorMethod · 0.95
suggest_fixMethod · 0.95
ErrorDatabaseClass · 0.90

Tested by

no test coverage detected