MCPcopy Create free account
hub / github.com/AutoForgeAI/autoforge / test_get_ready_features

Function test_get_ready_features

test_dependency_resolver.py:330–356  ·  view source on GitHub ↗

Test getting ready features.

()

Source from the content-addressed store, hash-verified

328
329
330def test_get_ready_features():
331 """Test getting ready features."""
332 print("\nTesting get_ready_features:")
333
334 features = [
335 {"id": 1, "priority": 1, "dependencies": [], "passes": True},
336 {"id": 2, "priority": 2, "dependencies": [], "passes": False, "in_progress": False},
337 {"id": 3, "priority": 3, "dependencies": [1], "passes": False, "in_progress": False},
338 {"id": 4, "priority": 4, "dependencies": [2], "passes": False, "in_progress": False},
339 ]
340
341 ready = get_ready_features(features)
342
343 # Features 2 and 3 should be ready
344 # Feature 1 passes, feature 4 blocked by 2
345 ready_ids = [f["id"] for f in ready]
346
347 if 2 in ready_ids and 3 in ready_ids:
348 if 1 not in ready_ids and 4 not in ready_ids:
349 print(f" PASS: Ready features: {ready_ids}")
350 return True
351 else:
352 print(f" FAIL: Should not include passing/blocked. Got: {ready_ids}")
353 return False
354 else:
355 print(f" FAIL: Should include 2 and 3. Got: {ready_ids}")
356 return False
357
358
359def test_get_blocked_features():

Callers

nothing calls this directly

Calls 1

get_ready_featuresFunction · 0.90

Tested by

no test coverage detected