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

Method test_record_fix

tests/test_learning.py:139–148  ·  view source on GitHub ↗

Should record fix for error.

(self)

Source from the content-addressed store, hash-verified

137 assert key is not None
138
139 def test_record_fix(self):
140 """Should record fix for error."""
141 db = ErrorDatabase()
142 key = db.record_error("ModuleNotFoundError", "No module named 'flask'")
143 db.record_fix(key, "pip install flask", success=True)
144
145 # Verify fix was recorded
146 similar = db.find_similar_errors("ModuleNotFoundError", "No module named 'flask'")
147 assert len(similar) > 0
148 assert similar[0][0].success == True
149
150 def test_learn_from_error_and_fix(self):
151 """Should learn from complete error-fix cycle."""

Callers

nothing calls this directly

Calls 4

record_errorMethod · 0.95
record_fixMethod · 0.95
find_similar_errorsMethod · 0.95
ErrorDatabaseClass · 0.90

Tested by

no test coverage detected