Test that dependencies manifest is complete and accurate.
(test: CacheLintStressTest)
| 287 | |
| 288 | |
| 289 | def test_manifest_completeness(test: CacheLintStressTest) -> None: |
| 290 | """Test that dependencies manifest is complete and accurate.""" |
| 291 | print("\n📋 TEST 6: Dependency Manifest Validation") |
| 292 | print("-" * 70) |
| 293 | |
| 294 | try: |
| 295 | # Check all required operations exist |
| 296 | required_ops = ["python_lint", "javascript_lint", "cpp_lint"] |
| 297 | found_ops: list[str] = [] |
| 298 | |
| 299 | for op in required_ops: |
| 300 | try: |
| 301 | test.manifest.get_operation(op) |
| 302 | globs: list[Any] = test.manifest.get_globs(op) |
| 303 | if globs: |
| 304 | found_ops.append(op) |
| 305 | test.pass_test( |
| 306 | f"Operation '{op}' defined with {len(globs)} glob patterns" |
| 307 | ) |
| 308 | else: |
| 309 | test.fail_test(f"Operation '{op}'", "No glob patterns defined") |
| 310 | except KeyError: |
| 311 | test.fail_test(f"Operation '{op}'", "Not found in manifest") |
| 312 | |
| 313 | if len(found_ops) == len(required_ops): |
| 314 | test.pass_test("All required operations present in manifest") |
| 315 | |
| 316 | except KeyboardInterrupt as ki: |
| 317 | handle_keyboard_interrupt(ki) |
| 318 | raise |
| 319 | except Exception as e: |
| 320 | test.fail_test("Manifest validation", str(e)) |
| 321 | |
| 322 | |
| 323 | def test_cache_performance_all_caches(test: CacheLintStressTest) -> None: |
no test coverage detected