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

Method test_statistics

tests/test_learning.py:180–188  ·  view source on GitHub ↗

Should return error statistics.

(self)

Source from the content-addressed store, hash-verified

178 assert suggestion == "pip install flask"
179
180 def test_statistics(self):
181 """Should return error statistics."""
182 db = ErrorDatabase()
183 db.learn_from_error("ValueError", "invalid literal", "fix input", True)
184 db.learn_from_error("TypeError", "wrong type", "fix type", False)
185
186 stats = db.get_statistics()
187 assert "total_patterns" in stats
188 assert "success_rate" in stats
189
190
191class TestStrategyTracker:

Callers

nothing calls this directly

Calls 3

learn_from_errorMethod · 0.95
get_statisticsMethod · 0.95
ErrorDatabaseClass · 0.90

Tested by

no test coverage detected