MCPcopy Create free account
hub / github.com/KentBeck/BPlusTree3 / run_varied_capacity_tests

Function run_varied_capacity_tests

python/tests/fuzz_test.py:505–526  ·  view source on GitHub ↗

Run fuzz tests with different capacities

()

Source from the content-addressed store, hash-verified

503
504
505def run_varied_capacity_tests():
506 """Run fuzz tests with different capacities"""
507 capacities = [3, 4, 5, 8, 16]
508 all_passed = True
509
510 for capacity in capacities:
511 print(f"\n{'='*60}")
512 print(f"Testing with capacity {capacity}")
513 print("=" * 60)
514
515 tester = BPlusTreeFuzzTester(
516 capacity=capacity, prepopulate=500
517 ) # Pre-populate each test
518 if not tester.run_fuzz_test(
519 50000
520 ): # 50k ops per capacity (reduced due to prepopulation)
521 all_passed = False
522 print(f"❌ FAILED with capacity {capacity}")
523 else:
524 print(f"✅ PASSED with capacity {capacity}")
525
526 return all_passed
527
528
529if __name__ == "__main__":

Callers 1

fuzz_test.pyFile · 0.85

Calls 2

run_fuzz_testMethod · 0.95
BPlusTreeFuzzTesterClass · 0.85

Tested by

no test coverage detected