We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6f8efe8 + 796bedb commit bab36a0Copy full SHA for bab36a0
1 file changed
tinytorch/tests/18_memoization/test_kv_cache_integration.py
@@ -291,15 +291,15 @@ def test_cache_boundary_conditions(self):
291
cache.update(0, k, v)
292
assert False, "Should raise ValueError on overflow"
293
except ValueError as e:
294
- assert "Sequence position" in str(e)
+ assert "cache is full" in str(e).lower() or "position" in str(e).lower()
295
print(f"✅ Overflow protection works: {str(e)[:50]}...")
296
297
# Test 4: Invalid layer index
298
try:
299
cache.get(layer_idx=99)
300
assert False, "Should raise ValueError for invalid layer"
301
302
- assert "Layer index" in str(e)
+ assert "layer" in str(e).lower() and "index" in str(e).lower()
303
print(f"✅ Layer bounds checking works: {str(e)[:50]}...")
304
305
0 commit comments